【问题标题】:Clear GrantSendOnBehalfTo on a mailbox exchange - from remote powershell script清除邮箱交换上的 GrantSendOnBehalfTo - 从远程 powershell 脚本
【发布时间】:2013-08-16 17:41:38
【问题描述】:

要从邮箱中撤销 GrantSendOnBehalfTo 的权限,有据可查,您可以这样做:

Set-Mailbox -Identity MyMailbox -GrantSendOnBehalfTo $null

从 powershell 和本地脚本运行时有效。

但是,如果我将它包含在运行远程 powershell(使用 New-PSSession 等)的脚本中,则会失败并出现以下错误:

找不到对象“[Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter]”。请确保它是 拼写正确或指定不同的对象。 + CategoryInfo : NotSpecified: (:) [], ManagementObjectNotFoundException +fullyQualifiedErrorId:A32A9BAB

所以它不会接受 $null 作为参数。

我怎样才能解决这个问题?

【问题讨论】:

    标签: powershell exchange-server-2010


    【解决方案1】:

    实际上,特别是如果这是带有 DirSync 的 Office 365,最简单的方法是将 AD 中的 publicDelegates 属性留空。

    确保使用 UPN 作为标识(如果使用单个邮箱则不需要):

    Set-Mailbox -identity xxx@something.com -grantSendOnBehalfTo $null
    

    Set-Mailbox xxx@something.com -grantSendOnBehalfTo $null
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-30
      • 1970-01-01
      • 2015-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多