FAQ: How do I manually connect to Office 365 remote PowerShell?

To connect to the Office 365 remote PowerShell, type the follwoing 3 commands in your local PowerShell:


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

Import-PSSession $session

If you get an error at this stage about the execution of scripts being disabled on the system, you should close Powershell and run again as Administrator. Then run the following command to allow the scripts to execute and start the sequence of commands again.

set-executionpolicy RemoteSigned


Updated: April 15, 2016

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section