Share calendar with PowerShell Office 365

To share user’s calendar with another users in an origination, we can click the button “Share Calendar” on the top ribbon of menu bar, or run the command ” Add-MailboxFolderPermission” by using Windows PowerShell.

To do this, please perform the steps below:

1. Install and configure Windows PowerShell.
2. Connect Windows PowerShell to Exchange Online

Run the following to authenticate yourself and import PowerShell commands to your local session:

$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

 
Image 1

3. Run the cmdlet below to grant appropriate permission to a user, who can view or edit another one’s calendar.

 

Add-MailboxFolderPermission –Identity <MailboxFolderId> -AccessRight <MailboxFolderAccessRight> -User < MailboxFolderUserId >

Note:
The Identity parameter specifies the recipient and folder that you want to change the permissions for, and the User parameter specifies who's granted permission to view or modify the folder contents of the user specified in the Identity parameter.

 

For example:
This example assigns permissions for Anna to access John's calendar mailbox folder and applies the readitems role to her access of that folder

Add-MailboxFolderPermission –Identity cf@losgrecos.onmicrosoft.com:\Calendar -AccessRight ReadItems -User joannav@losgrecos.onmicrosoft.com


Image 2

For more information about add mailbox folder permission, please refer to the article below:

Add-MailboxFolderPermission
https://technet.microsoft.com/en-us/library/dd298062.aspx