Skip to content

Instantly share code, notes, and snippets.

@rampadc
Created October 24, 2023 03:09
Show Gist options
  • Save rampadc/954de06dffbfc60148261a08a2c74634 to your computer and use it in GitHub Desktop.
Save rampadc/954de06dffbfc60148261a08a2c74634 to your computer and use it in GitHub Desktop.
Add owners to shared outlook calendar

You will need a Windows machine with the Microsoft Outlook app installed to look up the mailbox's location.

  1. Start Powershell, doesn't have to be admin mode.
  2. Install the Exchange Online Powershell module: https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exchange-online-powershell-module
  3. Import the module: Import-Module ExchangeOnlineManagement
  4. Login and connect: Connect-ExchangeOnline -UserPrincipalName <UPN>. The <UPN> is your e-mail address. This will open the browser to authenticate you.
  5. Get the shared calendar or mailbox path. This can be found in the calendar's Properties panel, in "General > Location" tab in the Outlook desktop app. For example, let's say it is \\user@domain.com\Calendar, and the calendar's name is Calendar name.
  6. Get existing users' permissions: Get-MailboxFolderPermission -Identity user@domain.com:"\Calendar\Calendar name". Reference: https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailboxfolderpermission?view=exchange-ps
  7. Set an existing user's permission: Set-MailboxFolderPermission -Identity user@domain.com:"\Calendar\Calendar name" -User other-user@domain.com -AccessRights Owner. Reference: https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailboxfolderpermission?view=exchange-ps
  8. Add a new user with owner permission: Add-MailboxFolderPermission -Identity user@domain.com:"\Calendar\Calendar name" -User new-user@domain.com -AccessRights Owner. Reference: https://learn.microsoft.com/en-us/powershell/module/exchange/add-mailboxfolderpermission?view=exchange-ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment