How to Connect to Office 365 Through Powershell

1- In Windows run PowerShell as an admin

2- Install PowerShell v2 if not installed

Install-Module -Name ExchangeOnlineManagement

3- Import Exchange Online Management module

Import-Module ExchangeOnlineManagement

4- Connect to Office 365 with admin user

Connect-ExchangeOnline  -UserPrincipalName

Replace above with office 365 administrator account.  You will be prompted for credentials.

5- After that if you want, for instance, to grant a user named User1 “Author” permissions on root of public folders

Get-PublicFolder -Identity “\” -Recurse | Add-PublicFolderClientPermission -User  User1 -AccessRights Author

Replace User1 above with the user you want to grant access

6- To view permissions on the public folders called My Public Folder

Get-PublicFolderClientPermission “\My Public Folders”

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *