Had a request to allow all users access to the new hires Exchange user calendar and some researched determined that this was not a job for the Exchange Managememt Console GUI. Instead it required a bit of PowerShell scripting to get the job done. It is best to run Get-MailboxDatabase before editing the script to retrieve the [Database Name] and [Username]. Here is the final product for accomplishing this task:
Add Exchange User Calendar Permissions via Powershell
$mailboxes = Get-Mailbox -Database “[Database Name]”
$AccessRights = “Reviewer”
$newusername = “[Username]”
foreach ($mailbox in $mailboxes) {
$calendar = (($mailbox.SamAccountName)+ “:\” + (Get-MailboxFolderStatistics -Identity $mailbox.SamAccountName -FolderScope Calendar | Select-Object -First 1).Name)
Write-Host “Updating calendar permission for $mailbox…” -ForegroundColor Yellow
add-MailboxFolderPermission -User $newusername -AccessRights $AccessRights -Identity $calendar
}
If your company is using on-premise Microsoft Exchange User Calendar or needs any help migrating to Office 365, then contact us for assistance.