{"id":708,"date":"2016-04-08T13:27:25","date_gmt":"2016-04-08T13:27:25","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=708"},"modified":"2016-04-08T13:27:25","modified_gmt":"2016-04-08T13:27:25","slug":"setting-calendar-permission-in-bulk","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2016\/04\/setting-calendar-permission-in-bulk\/","title":{"rendered":"Setting calendar permission in bulk"},"content":{"rendered":"<p>A simple snippet that&#8217;ll allow you to give a certain group PublishingAuthor rights to all calendars in your organization:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n\n$mailboxes = get-mailbox -Resultsize Unlimited\nforeach ($mailbox in $mailboxes){\ntry{\nRemove-MailboxFolderPermission -Identity &quot;$($mailbox.alias):\\Calendar&quot; -User INSERTUSERORGROUPNAMEHERE\u00a0-Confirm:$False -ErrorAction Stop | Out-Null\nAdd-MailboxFolderPermission -Identity &quot;$($mailbox.alias):\\Calendar&quot; -User INSERTUSERORGROUPNAMEHERE -AccessRights PublishingEditor -ErrorAction Stop | Out-Null\nWrite-Host &quot;$($mailbox.alias) processed&quot; -ForeGroundColor Green\n}catch{\nWrite-Host &quot;$($mailbox.alias) failed&quot; -ForeGroundColor Red\n}\n\n}\n\n<\/pre>\n<p>A warning though, calendar permissions in Exchange Online can easily become corrupted. I&#8217;ve been in touch with support several times, but their only fix is to tell the user to remove and reapply the permissions, which is a sure way to annoy your users during migration.<\/p>\n<p>So, communicate this in advance!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A simple snippet that&#8217;ll allow you to give a certain group PublishingAuthor rights to all calendars in your organization: $mailboxes = get-mailbox -Resultsize Unlimited foreach ($mailbox in $mailboxes){ try{ Remove-MailboxFolderPermission -Identity &quot;$($mailbox.alias):\\Calendar&quot; -User INSERTUSERORGROUPNAMEHERE\u00a0-Confirm:$False -ErrorAction Stop | Out-Null Add-MailboxFolderPermission -Identity &quot;$($mailbox.alias):\\Calendar&quot; -User INSERTUSERORGROUPNAMEHERE -AccessRights PublishingEditor -ErrorAction Stop | Out-Null Write-Host &quot;$($mailbox.alias) processed&quot; -ForeGroundColor Green }catch{ &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2016\/04\/setting-calendar-permission-in-bulk\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setting calendar permission in bulk<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[18,39],"tags":[],"class_list":["post-708","post","type-post","status-publish","format-standard","hentry","category-exchange-online","category-powershell"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=708"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/708\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}