Guest User

Untitled

a guest
Nov 15th, 2012
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Full Access
  2.  
  3.     Get-Mailbox MAILBOX | %{$foo = $_; Get-MailboxPermission $foo | ?{$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}} | ft {$foo},User,AccessRights
  4.  
  5. #SendAs (this version would list all mailboxes)
  6.  
  7.     get-mailbox | %{$mailbox = $_; Get-ADPermission $mailbox.DistinguishedName | ?{$_.ExtendedRights -like "Send-As" -and $_.User -notlike "NT AUTHORITY\SELF"}} | ft {$mailbox},user,{"Send-As"}
  8.  
  9. #A version with Full Access as a CSV
  10.  
  11.     Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', $_.AccessRights)}} | Export-Csv -NoTypeInformation c:\jktmp\mailboxperm.csv
Advertisement
Add Comment
Please, Sign In to add comment