Dec 20 2020 04:50 PM - edited Dec 20 2020 05:33 PM
Greetings.
When trying to connect to exchange online (o365), I'm getting this message:
Import-PSSession : Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.
At C:\Program files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.3\ExchangeOnlineManagement.psm1:435 char:40
+ ... oduleInfo = Import-PSSession $PSSession -AllowClobber -DisableNameChe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-PSSession], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ImportPSSessionCommand
I am on a VM I built on Azure. Simple Windows 10 Env.
The command I used:
Connect-ExchangeOnline -ConnectionUri "https://outlook.office365.com/powershell-liveid?SerializationLevel=Full"
Is there something I'm missing on the configuration of the VM? I am running PWSH in Admin mode.
Any help appreciated.
Note: I updated to 7.1 and I now get the error shown in the screen grab:
Dec 21 2020 10:41 AM
SolutionThe Exchange online PS module is not yet supported on PSCore/7.1, use good old Windows PowerShell instead. Apart from that, you seem to have the execution policy misconfigured, use Set-ExecutionPolicy to address that.
Dec 21 2020 11:00 AM
Dec 21 2020 10:41 AM
SolutionThe Exchange online PS module is not yet supported on PSCore/7.1, use good old Windows PowerShell instead. Apart from that, you seem to have the execution policy misconfigured, use Set-ExecutionPolicy to address that.