Wednesday, 12 December 2018

Connect to O365 exchange with powershell using session import

 

It seems fairly obvious but a lot of people are unsure how to import a remote powershell session to O365. Simply do the following:

 

 

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

Import-PSSession $Session

 

 

 

No comments:

Post a comment