In this article, I’ll show you how I give multiple users permission to a user Calendar mailbox hosted on Exchange Server 2016 using a.CSV file.
The code In this article Will also work on Exchange Server 2010, 2013 and Exchange Online running In Office 365 Cloud.
Giving Calendar permissions to multiple users without using a .CSV file can be a very long and manual task, the use of a.CSV file and PowerShell shorten the tasks from minutes to seconds.
The Calendar management cmdlets are built from the 4 cmdlets below that can Add, Remove, Edit and Get Information about the User Calendar.
Add-MailboxFolderPermission Get-MailboxFolderPermission Remove-MailboxFolderPermission Set-MailboxFolderPermission
In this article, I will use the Add cmdlet and I’ll give 2 users access to the Administrator’s mailbox Calendar:
To get all the available cmdlet use:
Get-cmdlet *-MailboxFolderPermission*
I have created a .CSV file with the users that will access to the Administrator Calendar with the content below:
alias David.Hyper Don.Shell
Next, I’ll use the code below to give the users In the .CSV file access to the Administrator’s calendar, In my case I use owner access rights.
Import-Csv users.csv | foreach { add-MailboxFolderPermission -Identity "administrator:\calendar" -User $_.alias -AccessRights owner }
Next, I’ll get the permissions from the Administrator’s mailbox to confirm that the cmdlet worked.
Get-MailboxFolderPermission -Identity administrator:\calendar
To remove access, I'll use the code below If needed. Import-Csv users.csv | foreach { remove-MailboxFolderPermission -Identity "administrator:\calendar" -User $_.alias -Confirm:$false }