MSOnline can't be imported on PowerShell (Connect-MsolService error)

前端 未结 6 2148
广开言路
广开言路 2020-12-02 23:55

I had this issue and couldn´t find any answer. The issue was that I was trying to use Azure cdmlets to connect to O365 via c# code, but I couldn´t get the connect-msol

6条回答
  •  借酒劲吻你
    2020-12-03 00:09

    I'm using a newer version of the SPO Management Shell. For me to get the error to go away, I changed my Import-Module statement to use:

    Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking;

    I also use the newer command:

    Connect-SPOService

提交回复
热议问题