Active-Directory

在哪些共享郵箱中輸入了具有 sendas 權限的安全組?

  • October 19, 2020

如何使用 powershell,其中共享郵箱是使用 sendas 權限輸入的安全組?

嘗試在 EMS 中執行以下命令,查看哪些共享郵箱具有Send As安全組的權限:

$shared = Get-Mailbox -RecipientTypeDetails Shared
foreach($s in $shared)
{
$Name = "*" + $s.Name + "*" 
Get-ADPermission -Identity "<Security Group Name>" | where{$_.ExtendedRights -like "*send*" -and $_.User -like $Name}
}

以下顯示我的測試結果的快照供您參考: 在此處輸入圖像描述

嘗試:

$shared = Get-Mailbox -RecipientTypeDetails Shared
foreach($s in $shared)
{Get-RecipientPermission -Identity "<Security Group Name>" | where{$_.Trustee -eq $s.PrimarySmtpAddress -and $_.AccessRights -like "*SendAs*"}}

引用自:https://serverfault.com/questions/1038660