【发布时间】:2020-01-09 04:03:09
【问题描述】:
remove-mailboxPermission 和 Add-MailboxPermission 存在问题。我收到以下错误:
Command Get-Mailbox 有效,但其余无效(注意:我已经编辑了我们的 DNS)
#PowerShell script to add access to an email and not map
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Get-Mailbox davidb@aaa.com
Remove-MailboxPermission -Identity davidb@aaa.com -User AshleyD@aaa.com -AccessRights FullAccess
Add-MailboxPermission -Identity davidb@aaa.com -User AshleyD@aaa.com -AccessRights FullAccess -AutoMapping:$false
Remove-PSSession $Session
【问题讨论】:
标签: powershell email office365