Symptom

When running the following command

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

you receive the following error in Remote Powershell for Exchange Online (Office 365)

Files cannot be loaded because running scripts is disabled on this system.  Provide a valid certificate with which to sign the files.

Scipts-Disabled---Remote-Powershell

 

Resolution

Run the following command

Set-ExecutionPolicy RemoteSigned

and then run the original command again.

Note: You’ll only need to run this command once from the computer you are using to connect to Remote Powershell, not every time you connect.