Exchange PowerShell - Get calendar folder permissions in any language

Exchange PowerShell - Get calendar folder permissions in any language

·

1 min read

Getting a user's calendar folder permissions in Exchange via PowerShell is pretty straight forward as you can just use the standard :\\Calendar naming convention like below:

Get-MailboxFolderPermission -Identity user@domain:\\Calendar

This works fine if the user's mailbox language is set to English but what if they have it set to something else, like perhaps German? Well you probably guessed correctly that the native spelling of calendar (Kalender) is used. Luckily we can query the user's mailbox to find out what folders are available and filter them to find the primary calendar directory:

$calendarFolder = Get-MailboxFolderStatistics -Identity user@domain -FolderScope Calendar | Where-Object { $\_.FolderType -eq 'Calendar'} | Select-Object Name, FolderId

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailboxfolderstatistics?view=exchange-ps

This will get the user's default calendar. If you wanted to get a particular a secondary calendar you can omit the where clause.

Now that we have the folderId we can use the first command to get the folder permissions:

Get-MailboxFolderPermission -Identity "$user@domain:$($calendarFolder.FolderId)"

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailboxfolderpermission?view=exchange-ps