Grant user access to list of calendars via PowerShell

If you have a user that requires access to several other user’s calendars you can set the permissions using PowerShell and a text file containing the list of mailboxes.

Example text file contents:
User.Number1@contoso.com:\Calendar
User.Number2@contoso..com:\Calendar
User.Number3@contoso..com:\Calendar

To give Joe.Bloggs@contoso.com ‘Editor’ access to those multiple calendars (first connect to O365 session if required):

Get-Content C:\Scripts\UserList.txt | foreach {$_; Add-MailboxFolderPermission -Identity $_ -User Joe.Bloggs@contoso.com -AccessRights Editor}

Note that if a calendar permission is already defined for the user it will NOT get overwritten/updated (the script will return an error but carry on to the next entry). To update permissions you can use Set-MailboxFolderPermission instead.

Related Posts

Need IT Help?

If you need assistance please feel free to reach out to us.