Right then! More PowerShell shenanigans and this one is more by necessity rather than simply ‘doing it because you can’ as (correct me if I’m wrong) there’s no way to do this in the GUI/Admin Center.
So, nice and simple really this one. As before in the last post, you’ll need to connect to your Office365 environment first before typing any commands and you can do this by running the following lines of code:
> Connect-ExchangeOnlineThis is the new way to connect to Exchange online, no more need for the convoluted method from before!
Then, once you’ve done that
> Add-MailboxFolderPermission -Identity firstname.lastname@example.org:\calendar -user email@example.com -AccessRights Editor This adds USER2 to the permission set for USER1 with the access rights of editor.
And to remove (somewhat obviously)
> Remove-MailboxFolderPermission -Identity firstname.lastname@example.org:\calendar -user email@example.com This removes USER2 to the permission set for USER1 (without the access level tag)
That’s it! Then end your session by running the following command:
> Remove-PSSession $SessionThis will end the connection to the O365 environment.