Jordan Howard
asked on
Get MailFolderPermissions
I need to pull what permissions are on each top level (top of information store) folder of each users mailbox. I have tried many different ways and I need some fresh eyes/thoughts - Don't want to cloud anyone elses mind so I just give the basic command for an individual...
Get-MailboxFolderPermissio n -identity (user's email) | ft -Property User,AccessRights
I need a command/script that will gather this for each user in my organization and also label which mailbox it's from.
Get-MailboxFolderPermissio
I need a command/script that will gather this for each user in my organization and also label which mailbox it's from.
Try this code..
$mailbox = Get-Mailbox -ResultSize Unlimited
$(Foreach ($Mbx in $mailbox){
Get-MailboxFolderPermission $Mbx.alias |
?{$_.FolderName -eq "Top of Information Store"} |
Select @{N="MailBox";E={$Mbx.alias}},FolderName,User,AccessRights,Identity
})| Export-Csv C:\MailboxFolderPermission.csv -NoTypeInformation
On line 3 in my code it should be Get-MailboxFolderPermissio n (not Get-MailboxFolderPermissio ns)
Will.
Will.
ASKER
Nice Subsun - But the export to csv never puts the format right for AccessRights. It always shows up as "System.Collections.Object Model.Coll ection`1[M icrosoft.E xchange.Ma nagement.S toreTasks. MailboxFol derAccessR ight]"
Any ideas?
Any ideas?
To correct that you can pipe it to "| out-string " before the export-csv command.
Will.
Will.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AWESOME!!!! Thanks Subsun! Will I think I see what you were doing but it was erring out.
Open in new window
Will.