Partager via


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

Comments

  • Anonymous
    January 01, 2003
    Thank you for the time you spend to read this article :)

  • Anonymous
    January 01, 2003
    Thank you Michael, i'm glad this article help you :)

  • Anonymous
    January 01, 2003
    Thank you Stoyan :)

  • Anonymous
    September 06, 2013
    the perfect explanation and its working thanks Joannav

  • Anonymous
    February 07, 2014
    Awesome! One-shot resolution of my issue :) Thanks

  • Anonymous
    June 30, 2014
    Thanks! This was great information. I created a security group and then ran this with the group getting permission to various calendars. It worked flawlessly!

  • Anonymous
    March 25, 2015
    I try something else and worked much better because it gave me full access to someone else calendar.

    $LiveCred = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    - In this example below, user2 would be able to open user1 calendar and edit it.
    Add-MailboxFolderPermission -Identity user1@domain.com:calendar -user user2@domain.com -AccessRights Editor