Powershell

Exchange Posta Kutularına Tam Erişim, Farklı Gönder ve Adına Gönder Olan Tüm Kullanıcıların Listesi Nasıl Çıkarılır?

Full Access

$mailboxes = Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"')  
  
foreach ($mailbox in $mailboxes)   
{ Get-MailboxPermission -Identity $mailbox.alias -ResultSize Unlimited | ?{($_.IsInherited -eq $false) -and ($_.User -ne "NT AUTHORITY\SELF") -and ($_.AccessRights -like "FullAccess")} | select Identity, User, AccessRights }

Send As

$mailboxes = Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"')  
  
foreach ($mailbox in $mailboxes)   
{ Get-ADPermission -Identity $mailbox.alias | ? { $_.ExtendedRights -like "*send*" -and -not ($_.User -match "NT AUTHORITY") -and ($_.IsInherited -eq $false)} | select Identity,User,ExtendedRights }

Send On Behalf

Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"') | select Alias, GrantSendOnBehalfTo

Başka örnekler

Full Access

$fullaccess = Get-Mailbox -ResultSize unlimited | Get-MailboxPermission | Where-Object {(-not ($_.identity -like "*DiscoverySearchMailbox*")) -and (-not ($_.User -like "NT AUTHORITY\SELF")) -and ($_.IsInherited -eq $false)}

$fullaccess | Sort-Object Identity |Select-Object Identity,User,AccessRights| Export-Csv -Path C:\temp\exonfullaccess.csv -Encoding UTF8 -Delimiter ";"  

Send As

$sendas = Get-Mailbox -ResultSize unlimited | Get-RecipientPermission | Where-Object {(-not ($_.identity -like "*DiscoverySearchMailbox*")) -and (-not ($_.Trustee -like "NT AUTHORITY\SELF")) -and ($_.IsInherited -eq $false)}

$sendas | Sort-Object Identity |Select-Object Identity,Trustee,AccessRights| Export-Csv -Path C:\temp\exonsendas.csv -Encoding UTF8 -Delimiter ";"

Send On Behalf

$sendonbehalf = Get-Mailbox -ResultSize unlimited | Where-Object {$_.GrantSendOnBehalfTo -ne $null}

$sendonbehalf  | Sort-Object Identity |Select-Object Userprincipalname,PrimarySMTPAddress,GrantSendOnBehalfTo| Export-Csv -Path C:\temp\exonsendonbehalf.csv -Encoding UTF8 -Delimiter ";"

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir