Connect to 365 powershell

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

For 365 with MFA the below can be used.

Connect-MsolService

You may need the following modules and execution policies to be set

Leave a Reply