Below is a script that will export calendar permissions to utf8-formatted csv-file. Works with Onpremise Exchange as well as Exchange Online.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
$col = @() $mbxs = get-mailbox -Resultsize unlimited foreach ($mbx in $mbxs) { $mbx $calendarName = Get-MailboxFolderStatistics $mbx.userprincipalname | where-object { $_.FolderType -eq "Calendar" } | select-Object Name $mailboxCalPermissions = get-MailboxFolderPermission ("{0}`:{1}" -f ($mbx.userprincipalname).toString(),$calendarName.Name)|select-object @{Name="PrimaryMailBox";Expression={$mbx.userprincipalname}}, FolderName,User,AccessRights|where-object { $_.AccessRights -ne {None}} $col += $mailboxCalPermissions } $col $col | export-csv -nti -enc utf8 c:\temp\calendarPERM.csv |