Office 365: Connect to Exchange via Powershell

The following lines can be used to establish a connection to the Office 365 Exchange Management Shell:

$Creds = Get-Credential
$PSsession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $creds -Authentication Basic -AllowRedirection
Import-PSSession $PSsession

Nothing else needs to be installed on the local PC. A list of all commands can be obtained with "get-command".

Office 365

Attention: Not all commands of a local Exchange installation are available, also the output and/or the parameters differ. Scripts for a local Exchange installation therefore do not run on an Office 365 or Exchange Online account without further ado (in case someone gets the idea of using the Exchange Reporter...I'm just saying...).

Leave a Comment