Skip to content

Instantly share code, notes, and snippets.

@michevnew
Created August 8, 2020 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michevnew/8a3f27257bffc1992df6280d7f13ae34 to your computer and use it in GitHub Desktop.
Save michevnew/8a3f27257bffc1992df6280d7f13ae34 to your computer and use it in GitHub Desktop.
Set the default permission for all user calendars
$calendars = Get-Mailbox -RecipientTypeDetails UserMailbox | Get-MailboxFolderStatistics | ? {$_.FolderType -eq "Calendar"} | select @{n="Identity"; e={$_.Identity.Replace("\",":\")}}
$calendars | % {Set-MailboxFolderPermission -Identity $_.Identity -User Default -AccessRights AvailabilityOnly}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment