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
DeepakRandhawa
Sep 13, 2019Iron Contributor
you are correct "ResultSize -Unlimited" goes here
$mailboxes=Get-Mailbox -ResultSize Unlimited |?{$_.PrimarySMTPAddress -match "@contoso.com"}
For all permissions on a calendar simply remove "-User Ayla@contoso.com" part of the command.
$mailboxes=Get-Mailbox -ResultSize Unlimited |?{$_.PrimarySMTPAddress -match "@contoso.com"}
For all permissions on a calendar simply remove "-User Ayla@contoso.com" part of the command.
DiVojich
Sep 23, 2019Brass Contributor
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
{ Get-MailboxFolderPermission -Identity "$($Mailbox.Name):\Calendar" | Select @{n='Mailbox';e={$Mailbox.Name}},User,AccessRights}
out-file -filepath C:\Export.txt -inputobject $report