我想运行这个 Exchange power shell 命令,但在运行之前,我想确保有一个命令可以在它不起作用时将其撤消。命令如下:
Get-ReceiveConnector “My Internet ReceiveConnector” | Get-ADPermission -user “NT AUTHORITY\Anonymous Logon” | where {$_.ExtendedRights -like “ms-exch-smtp-accept-authoritative-domain-sender”} | Remove-ADPermission
答案1
该命令中唯一会做出更改的部分是Remove-ADPermission
。如果您运行其他所有内容,您将获得足够的信息来重新创建您正在删除的权限:
Get-ReceiveConnector “我的 Internet ReceiveConnector” | Get-ADPermission -user “NT AUTHORITY\Anonymous Logon” | 其中 {$_.ExtendedRights -like “ms-exch-smtp-accept-authoritative-domain-sender”} | Format-List