Forum Discussion
Calendar permissions
- Sep 23, 2019
This is what worked from me, after some tweaking
$Report = ForEach ($Mailbox in (Get-Mailbox -ResultSize Unlimited -RecipientType UserMailbox | Where-Object {($_.WindowsEmailAddress -like '*@"insert_domain_name"*')}))
{ Get-MailboxFolderPermission -Identity "$($Mailbox.Name):\Calendar" | Select @{n='Mailbox';e={$Mailbox.Name}},User,AccessRights}
out-file -filepath C:\Export.txt -inputobject $report
Hi,
a couple of questions...where should I put "ResultSize -Unlimited", I presume in Get-Mailbox 1st line?
Why is for user saying "Deafult" & not giving me names of actual users?
Also, calendar does not show the identities to the which the permissions apply....
Kind regards,
You have to use "-ResultSize Unlimited" with Get-Mailbox cmdlet
Get-Mailbox -ResultSize Unlimited
You have to exclude the parameter "-User Default" to list all user permissions in John's mailbox. If you provide "-User" parameter, then the command list only permission entries for the specific user in John's mailbox. The below command list all users who has permission in John's mailbox calendar.
Get-MailboxFolderPermission -Identity john@contoso.com:\Calendar
The below command lists all users permission entries in all users mailbox calendar.
Get-Mailbox -ResultSize Unlimited | ForEach {Get-MailboxFolderPermission -Identity "$($_.PrimarySMTPAddress):\Calendar" } | Select Identity,User,AccessRights
You can exclude the "Default" & "Anonymous" entries with Where-Object filter
Get-Mailbox -ResultSize Unlimited | ForEach {Get-MailboxFolderPermission -Identity "$($_.PrimarySMTPAddress):\Calendar" } | Where-Object {$_.User.DisplayName -ne "Default" -and $_.User.DisplayName -ne "Anonymous"} | Select Identity,User,AccessRights