Connect Powershell to Office365

Connect Powershell to Office365

Open Windows Powershell as Administrator and run the following commands:

$LiveCred = Get-Credential

Type your Office 365 administrator account and click ‘Ok’

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

Import-PSSession $Session