{"id":451,"date":"2020-11-02T16:11:18","date_gmt":"2020-11-02T16:11:18","guid":{"rendered":"http:\/\/www.torontohelpdesk.ca\/blog\/?p=451"},"modified":"2020-11-02T16:11:18","modified_gmt":"2020-11-02T16:11:18","slug":"office-365-removing-shared-permissions-to-a-calendar-via-powershell","status":"publish","type":"post","link":"http:\/\/www.torontohelpdesk.ca\/blog\/office-365-removing-shared-permissions-to-a-calendar-via-powershell\/","title":{"rendered":"Office 365 &#8211; Removing shared permissions to a calendar via PowerShell"},"content":{"rendered":"\n<p><strong>Problem:<\/strong><\/p>\n\n\n\n<p>Client wanted to remove select users from a shared calendar<\/p>\n\n\n\n<p><strong>Solution:<\/strong><br>(h\/t <a href=\"https:\/\/iqinit.uk\/how-to-add-and-remove-calendar-and-contacts-permissions-for-office-365-users-via-powershell\/\">IQinIT<\/a>)<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>$cred = Get-Credential<\/code><\/li><li><code>$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $cred -Authentication Basic \u2013AllowRedirection<\/code><\/li><li><code>Import-PSSession $session<\/code><\/li><li>Get-MailboxFolderPermission -Identity\u00a0user@domain.com:\\Calendar| Select User, AccessRights, Deny<\/li><li>Remove-MailboxFolderPermission -Identity\u00a0user@domain.com:\\Calendar -User\u00a0user2@domain.com<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Problem: Client wanted to remove select users from a shared calendar Solution:(h\/t IQinIT) $cred = Get-Credential $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $cred -Authentication Basic \u2013AllowRedirection Import-PSSession $session Get-MailboxFolderPermission -Identity\u00a0user@domain.com:\\Calendar| Select User, AccessRights, Deny Remove-MailboxFolderPermission -Identity\u00a0user@domain.com:\\Calendar -User\u00a0user2@domain.com<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":1,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"predecessor-version":[{"id":452,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions\/452"}],"wp:attachment":[{"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}