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
DiVojich
Sep 13, 2019Brass Contributor
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,
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.
- DiVojichSep 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