Get-MailboxPermission for hundreds of mailboxes
Hello Gurus,
Is it possible to prepare a CSV file and run a script that will get the the information of those who have access to a mailbox for hundreds of mailboxes in one go?
Please advise.
Thanks a lot.Never stop learning
August 27th, 2011 9:36am
What do you want the .csv to look like?
There could be multiple permission assignments per user, and multiple users accesses per mailbox. Exporting a muilti-valued property to a .csv field can get ugly.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2011 4:31pm
Run this command this will get the information of those who have access to a mailbox for hundreds of mailbox
1) This command is used for searching known user have multiple mailbox access
filter filt($keyword) { if ( ($_ | out-string) -like "*$keyword*" ) { $_ } }
get-mailbox -resultsize unlimited -server servername | get-mailboxpermission | filt <username) | Export-csv c:\userlist.csv
2) This command groups the user who have mutilple mailbox access
get-mailbox -resultsize unlimited -server servername | get-mailboxpermission | group-object -property User | sort
3) this command get mutiple user have multiple mailbox full access permission
$users = @("domain\admin","domain\administrator","domain\joseph")
get-mailbox -resultsize unlimited -server Servername | get-mailboxpermission | ? { ($users -contains $_.user) -and ($_.isinherited -eq $false ) } | export-csv "c:\userlist.csv"Thanks Joseph Pradeep =========================================================== If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer".
August 27th, 2011 4:43pm