Change the default visibility of calendars on Exchange


Exchange 2013 Exchange 2016 Exchange 2019 Exchange Online

Problem

The default visibility of calendars in Outlook / Exchange does not allow you to see the detail (object, location, description) of an event, unless the user has modified the rights himself.

Solution

It is possible in PowerShell to modify the default visibility of calendars in Exchange.

Connection to Exchange online / Office 365

Open the PowerShell prompt as administrator and enter the following commands:

$UserCredential = Get-Credential

Enter your Office 365 administrator credentials.

login ps office 365

These lines open the connection to Exchange Online and import the available commands.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
ps o365 import cmd

Changing calendar rights on Exchange

The following lines are to be executed in the PS window connected to Exchange Online or in a PS prompt on a local Exchange server

This line retrieves all the users of the Room type, to retrieve the users replacing “Room” by “User”.

$users = Get-MailBox | Where {$_.ResourceType -eq "Room"} | Select -ExpandProperty Alias

This line goes through all the results in the variable to modify the default rights of the calendar.

Foreach ($user in $users) {Set-MailboxFolderPermission $user":Calendar" -user Default -accessrights Reviewer}

It is possible that you have errors while executing this line, if your users have already opened their mailbox and the list of files is in another language, you will have to replace “: Calendar” by its translation




Leave a Comment