Forum Discussion
DiVojich
Sep 12, 2019Brass Contributor
Calendar permissions
Hi, I am new in PowerShell so little help would be most appreciated. I would need to use this cmdlet: Get-MailboxFolderPermission -Identity john@contoso.com:\Calendar -User Ayla@contoso.com but i...
- 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
ClaudioCerchia
Sep 12, 2019Copper Contributor
Hi DiVojich
I would suggest to do the following:
- Get all mailboxes with the cmdlet Get-Mailbox (https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailbox?view=exchange-ps)
- Iterate through each mailbox to get the mailbox folder permissions
For more information on iterating through an output, please use the documentation for the command ForEach-Object (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/foreach-object?view=powershell-6).