How to Connect / Disconnect to Office 365 with Powershell

​Connect to Office 365 with Powershell

  1. First make sure you have the remote signed execution policy set to true. You can do this by running PowerShell in admin mode and running: Set-ExecutionPolicy RemoteSigned
  2. Next, run the following to authenticate your self and import PowerShell commands to your local session:$LiveCred = Get-Credential
  3. $Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection
  4. Import-PSSession $Session

Disconnect from Office 365 with power script

Remove-PSSession $Session

Contact Info

Call us: 

02 6100 6236