Select Page

Open PowerShell as Administrator

Run Command
Connect-ExchangeOnline

Login with an account that has Administrative access to your Office365 tenant.

Once connected, you may need to press then type the following command to confirm that you are connected to exchange online.

Get-PSSession

The output above confirms that a Powershell session has been established to ExchangeOnline.

Run a command to test it out something like the command below
#This command will get a list of all mailboxes in the tenant


Get-Mailbox

Output hidden for security reasons.


Once you are done, you can disconnect from the Session

Run Command

Disconnect-ExchangeOnline -Confirm:$false

Your session is now disconnected. You may now close PowerShell.