Connect-SPOService -Url https://mstalk-admin.sharepoint.com 
Connect-SPOService : The term 'Connect-SPOService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Connect-SPOService -Url https://mstalk-admin.sharepoint.com
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Connect-SPOService:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

If you are getting above exception when trying to connect to SharePoint Online than it means that SharePoint Online PowerShell module is not installed on the machine where you are trying to run the cmdlet. It could happen when you trying to connect SharePoint online using PowerShell for the first time or it could also happen sometimes when you are working on different machines and get above error message.

This error |” Connect-SPOService : The term ‘Connect-SPOService’ is not recognized as the name of a cmdlet” came because because the “Connect-SPOService” cmdlet is part of SharePoint Online Management Shell (or SharePoint Online PowerShell Module), and PowerShell cmdlet is unable to load it.

Solution

You need to install SharePoint online PowerShell module to the machine where you are executing the the cmdlet. You can download it using below URL.

https://www.microsoft.com/en-us/download/details.aspx?id=35588

After the installation, close the PowerShell cmdlet window and open it again and try to run the Connect-SPOService again.

Adnan is six time Microsoft MVP (Since 2015) with over 16 years of extensive experience with major expertise on SharePoint, SharePoint based development, Microsoft 365, Microsoft Teams, .Net Platform and Microsoft BI. He is currently working Sr Microsoft Consultant at Olive + Goose. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past 12 years and worked on different intranet/intranet solutions for private & govt. sector majorly in United states and Gulf region and have experience of working with multiple Fortune 500 companies. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply