This is a tutorial on how to view, add and remove mailbox calendar permissions on Microsoft 365 (ex-Part-365) and on-premises Exchange Server via PowerShell. For example, you need to grant read permissions to the room mailbox agenda for a few users. You can grant room mailboxes calendar permissions for specific users or an Advertising security group. In most cases, y'all should assign agenda permissions to a security group. In this case, all you have to practice is to grant access to the specific mailbox calendar to add the user to the Active Directory group (without changing mailbox agenda permissions via PowerShell).

Past default, in Exchange Server system and Microsoft 365 (Exchange Online) tenant users can't view Outlook e-mails or calendar items of other users. The merely permission that is provided to all users by default is the power to view the Free/Busy information in other users' calendars (this is the AvailabilityOnly function).

Users can independently grant the necessary permissions for Outlook mailbox folders and items to other users (from the Outlook/OWA interface). Unfortunately, in Exchange 2019/2016/2013 and Exchange Online (Office 365), the administrator cannot centrally manage agenda permissions from the GUI (Exchange MMC, EAC — Exchange Assistants Center, or Microsoft 365 admin portal). However, you tin use a built-in Add-MailboxFolderPermission cmdlet, which allows managing user permissions on any user'south mailbox folder from PowerShell (this cmdlet get-go appeared in Exchange Server 2010). This cmdlet is also supported in Microsoft 365 deject tenants.

Connecting Microsoft 365/Exchange from PowerShell

Starting time, you demand to connect to your Microsoft 365 or on-bounds Exchange tenant.

Connecting to Microsoft 365 (Exchange Online) tenant with PowerShell:

  1. Open the Windows PowerShell console;
  2. Cheque if the Commutation Online PowerShell V2 (EXO V2) is installed on the estimator:
    Get-InstalledModule ExchangeOnlineManagement

    If the module is missing, yous tin can install information technology from the PowerShell Online Gallery using the following command:

    Install-Module PowershellGet

    office 365 calendar permissions powershell

  3. Run the following command to connect to your Exchange Online tenant:
    Connect-ExchangeOnline -UserPrincipalName kirill@theitbros.onmicrosoft.com -ShowProgress $true

    calendar permissions powershell

By default, Microsoft Modernistic Authentication is used to sign in. Specify your Microsoft 365 tenant admin credentials. If y'all accept MFA (Multi-Factor Authentication) enabled for your Azure account, yous must confirm your account login with your 2d gene.

Connecting to On-premises Exchange Server Organization with PowerShell

You can remotely connect to your on-prem Exchange Server 2010, 2013, 2016, and 2019 using PowerShell (you lot do not need to install the Commutation Management Beat out on your computer):

  1. Save your Commutation ambassador's credentials into the PowerShell variable:
    $LiveCred = Get-Credential
  2. Establish a remote PowerShell session with your Substitution Server:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://<your-target-substitution-server-accost>/powershell/ -Credential $LiveCred

Notation. In our example when we tried to run the previous control to connect Exchange 2010 nosotros've received an error:
[ny-msg-02] Connecting to remote server failed with the post-obit error message:
The WinRM client cannot procedure the request. The WinRM client tried to use Negotiate authentication mechanism, but the destination figurer (ny-msg-02:443) returned an 'access denied' error. Change the configuration to allow Negotiate authentication machinery to be used or specify 1 of the hallmark mechanisms supported by the server. To use Kerberos, specify the local figurer name every bit the remote destination. Too, verify that the customer estimator and the destination calculator are joined to a domain. To utilize Basic, specify the local computer proper noun every bit the remote destination, specify Basic hallmark and provide user name and password. Possible authentication mechanisms reported by the server.

  1. In our environment to connect to the target Exchange CAS server, we should use the HTTP connexion (instead of HTTPS) and Kerberos authentication. The connection command should look like this:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ny-msg-02/powershell/ -Credential $LiveCred -Authentication Kerberos
  2. The next footstep is to import Substitution management commands from a remote estimator to your PowerShell console:
    Import-PSSession $Session

Tip. It happens that when you run the Import-PSSession control, yous can face up an error:
Import-PSSession: Files cannot be loaded since running scripts has been disabled on this organisation. Provide a valid certificate with which to sign the files.

In this example, y'all need to allow script execution. Do this past setting the PowerShell Execution Policy value to RemoteSigned:

Set-ExecutionPolicy RemoteSigned

powershell calendar permissions
set calendar permissions powershell

Hint. If y'all logged in straight to the on-bounds Exchange server, you lot can either showtime the Exchange Direction Shell right abroad, or run a regular PowerShell.exe CLI, and load Exchange cmdlets with the control:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn                

How to Go Mailbox Calendar Permissions Using PowerShell?

  • You lot can view current agenda (folder-level) permissions of the specified mailbox by using the Get-MailboxFolderPermission cmdlet (this cmdlet is available in the cloud-based service and in on-bounds Exchange):
    Get-MailboxFolderPermission cyril@theitbros.onmicrosoft.com:\calendar


    FolderName User AccessRights SharingPermissionFlags
    ———- —- ———— ———————-
    Calendar Default {AvailabilityOnly}
    Agenda Bearding {None}
    Agenda Alex {Reviewer}
    Calendar Henrietta {Editor}

  • Change the username to the user account yous desire to bank check calendar permissions for;

Hint. If, when executing the post-obit commands, you're facing an error:
Get-MailboxFolderPermission : The term 'Go-MailboxFolderPermission' is not recognized as the name of a cmdlet, function, script file, or operable program. Cheque the spelling of the name, or if a path was included, verify that the path is correct and try again.
This means you lot did not complete the steps to connect to your Exchange/Microsoft 365 tenant and did not import PowerShell Exchange cmdlets into your session. Carefully read and follow the steps from the previous paragraph.

Note. If this control returns that 'username:\agenda' cannot be found, nearly likely the user has Outlook language settings other than English. Appropriately, the Calendar folder name tin be unlike (calendar\kalender\calendario\calendrier\календарь). For case, to view calendar permissions for the Dutch Language (nl-NL) employ the command:

Get-MailboxFolderPermission username:Calendar
  • You tin get the name of the calendar in the current user's language configuration with the command:
    (Get-MailboxFolderStatistics username -FolderScope Calendar).Identity

calendar permissions office 365 powershell

  • Check the current calendar permissions with the command:
    Get-MailboxFolderPermission brett.jackson:\calendar
  • As you tin see, the default AvailabilityOnly role is assigned on a agenda folder only.

exchange online calendar permissions

  • You tin get the list of all mailbox calendars permissions in your organization using the following control:
    Get-Mailbox | ForEach-Object {Get-MailboxFolderPermission $_":\calendar"} | Where {$_.User -like "Default"} | Select Identity, User, AccessRights

    Tip . In on-premise Exchange, you can view a user's agenda settings in a specific mailbox database using the following command:
    Go-Mailbox –database mbxdbname | ForEach-Object {get-MailboxFolderPermission $_":\agenda"}

  • Change mbxdbname to the proper name of your Exchange mailbox database.

Using PowerShell, y'all can observe all the calendars in your arrangement/tenant that a particular user has been granted access to. In this instance we desire to display a listing of user mailboxes, calendars to which the user named Mueller has admission:

Get-Mailbox | ForEach-Object {Get-MailboxFolderPermission $_":\calendar"} | Where {$_.User -like "*Mueller*"} | Select Identity, User, AccessRights

add calendar permissions powershell

The list of users whose calendars the user can admission are listed in the Identity column. The AccessRights field specifies the electric current calendar permissions.

Tip. You can use the Go-EXOMailboxFolderPermission cmdlet instead of Become-MailboxFolderPermission to view the permissions of mailbox items in the Exchange Online PowerShell V2 module.

Outlook: Calendar Permission Levels and Access Roles

When managing calendar and Outlook folder permissions, you lot can use the following built-in Commutation roles:

  • Owner — gives total control of the mailbox binder: read, create, modify, and delete all items and folders. Also, this role allows to manage item'due south permissions;
  • PublishingEditor — read, create, modify, and delete items/subfolders (all permissions, except the right to change permissions);
  • Editor — read, create, modify, and delete items (tin can't create subfolders);
  • PublishingAuthor — create, and read all items/subfolders. Y'all can modify and delete only items you create;
  • Writer — create and read items. Edit and delete ain items;
  • NonEditingAuthor — full read access, and create items. You can delete only your own items;
  • Reviewer — read folder items simply;
  • Contributor — create items and folders (tin't read items);
  • AvailabilityOnly — read Free/Busy info from the agenda;
  • LimitedDetails — view availability information with calendar item bailiwick and location;
  • None — no permissions to access binder and files.

set calendar permissions powershell office 365

You lot tin as well use granular permissions to fine-tune the admission rights to the mailbox agenda. The following values are available:

  • CreateItems;
  • CreateSubfolders;
  • DeleteAllItems;
  • DeleteOwnedItems;
  • EditAllItems;
  • EditOwnedItems;
  • FolderContact;
  • FolderOwner;
  • FolderVisible;
  • ReadItems.

The Permission Level roles described above are simply a set of granular permissions. For case, the Editor role is a set of the following individual permissions: CreateItems, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, FolderVisible, ReadItems

These permissions tin can be set using the –AccessRights parameter of the Set-MailboxFolderPermission cmdlet.

How to Set Role 365/Exchange Calendar Permissions Using PowerShell?

  1. In social club to grant user2 the permissions to view and edit user1 agenda items, run the following control:
    Add-MailboxFolderPermission -Identity user1@domain.com:\agenda -user user2@domain.com -AccessRights Editor
  2. If some of the items in the calendar are marked as Private, you can allow delegating the permissions to view Private agenda items. Use the command:
    Add-MailboxFolderPermission –Identity user1@domain.com:\calendar –User user2@domain.com -AccessRights Editor -SharingPermissionFlags Delegate,CanViewPrivateItems
  3. If you need to change the Default permissions for the calendar folder (to allow all organization users to view a calendar of the specified user), run the control:
    Set-MailboxFolderPermission -Identity user1@domain.com:\calendar -User Default -AccessRights Reviewer
  4. Check the current calendar permissions again using the Get-MailboxFolderPermissions cmdlet. They should modify:
    Get-MailboxFolderPermission -Identity user1@domain.com:\agenda

    FolderName User AccessRights
    ———- —- ————
    Calendar Default {Reviewer}
    Calendar Anonymous {None}
    Calendar user2 {Editor}

  5. You can also grant permissions for the mailbox non to an individual user, just the Commutation distribution grouping:
    New-DistributionGroup -Type Security -Name "Resources Calendar Owners" -Alias "grResourceCalendarAccess"

    add-MailboxFolderPermission -Identity user1@domain.com:\calendar -User grResourceCalendarAccess -AccessRights Owner

  6. In some cases, you demand to grant Reviewer permissions on a agenda binder in all user's mailboxes in your Exchange organization. Yous can make this bulk agenda permissions change using a uncomplicated PowerShell script. To alter the Default agenda permission for all mailboxes to Reviewer:
    foreach($usermbx in Get-Mailbox  -RecipientTypeDetails UserMailbox) {

    $usercalendar = $usermbx.alias+":\Calendar"

    Ready-MailboxFolderPermission -Identity $usercalendar -User Default -AccessRights Reviewer

    }

  7. Also, you lot can prepare a CSV file with a list of users, and assign them permissions to access a specific user's agenda:
    Import-Csv users.csv | foreach { add-MailboxFolderPermission -Identity "user1@domain.com:\calendar" -User $_.allonym -AccessRights Owner }

Y'all can utilise the parameter SendNotificationToUser of the Set-MailboxFolderPermission cmdlet to generate a "share invitation" email that summarizes your changes. The pick -SendNotificationToUser $true tin can be used simply when you set one of the following permissions via the AccessRights parameter: AvailabilityOnly, LimitedDetails, Reviewer, or Editor. The post-obit control volition send a sharing invitation to the user2:

Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Editor -SendNotificationToUser $truthful

This is what the sharing invitation volition look like in Outlook:

You're invited to share this calendar.
UserName has invited yous to view his or her Calendar. Click the Open button in a higher place.

office 365 powershell calendar permissions

How to Add together Shared Agenda in Outlook 2019/2016?

In society to view other calendars in Outlook 2019/2016 (including room resources, Shared calendars), you should switch to the agenda view and select the agenda type you desire to add. You can select a user from Address Volume (Global Accost Listing – GAL), Open up Shared Calendar (you should specify user proper noun), Room List, and Internet (web-calendar).

add-mailboxfolderpermission calendar

For instance, y'all want to add a calendar from the Global Address List. Detect the agenda name y'all want to add to Outlook and click OK. The shared agenda should appear under the My Calendars in Shared Calendars department.

365 calendar permissions powershell

How to Remove and Reset Calendar Permissions via PowerShell?

  1. Utilize the Remove-MailboxFolderPermission cmdlet to remove the calendar permissions:
    Remove-MailboxFolderPermission -Identity user1@domain.com:\calendar –user user2@domain.com
  2. If you want to reset user's agenda permissions to default, then run:
    Get-MailboxFolderPermission brett.jackson:\Agenda | % { Remove-MailboxFolderPermission -Identity $_.Identity -User $_.User }
  3. To exclude some "default" permissions entries from the removing script, employ the following PowerShell one-liner:
    Become-MailboxFolderPermission brett.jackson:\Calendar | ? {$_.User -notmatch "^(Default|Secretary|Bearding)$"} | % { Remove-MailboxFolderPermission -Identity $_.Identity -User $_.User.ADRecipient.ExchangeObjectId.Guid -Confirm:$false }
  4. Now you tin can disconnect your PowerShell session from Microsoft 365/Exchange:
    Remove-PSSession $Session
  • Author
  • Recent Posts

Brian Jackson started this blog in 2011. Brian has a huge passion for WordPress and technology for over a decade. Brian enjoys blogging, movies, and hiking.