Remote Powershell can be used to run commands on Exchange Online.  This can be particularly useful if a feature is not available using the exchange GUI.

Step 1

Run Windows Azure Active Directory Module for Windows Powershell.

Step 2

Enter the following command

$UserCredential = Get-Credential

A dialogue box should pop up at this stage.  Enter in your administrator username and password for exchange online

Step 3

Enter the following command

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Note – If you receive the error (click for instructions to resolve) – Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.

Step 4

Enter the following command

Import-PSSession $Session

Important – when finished using your remote powershell session be sure to disconnect the session otherwise you may need to wait for the sessions to expire when reconnecting.