Connecting to Office365 (Exchange Online) via Powershell

Connecting to Office365 (Exchange Online) via Powershell
  • Open Powershell as administrator
  • Run command – Set-ExecutionPolicy Remotesigned
  • Type Y for yes
  • Run command – $UserCredential = Get-Credential
  • Sign in with Office 365 administrator account (user@company.com)
  • Run command – $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrl https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  • Run command – Import-PSSession $Session
  • You are now connected to Office 365 Exchange Online
2018-10-30T13:24:08-04:00