none
PowerShell - Connect-SPOService is not recognized? RRS feed

  • Question

  • Hi there

    When I run Connect-SPOService, I get this error on my PowerShell. 

    Any thoughts please?

    Thanks.

    > connect-sposervice
    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
    + ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (connect-sposervice:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    

    Friday, May 17, 2019 8:03 PM

Answers

All replies

  • Hi

    It looks you don't have the SharePoint Online Management Shell related modules not available on your machine.

    To confirm this,use this command

    Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

    If you receive the same error, then you need to install the "PowerShell Module" to manage the SharePoint site related management through Shell.
    Learn more about this link on installing the PS for SharePoint Online @ SharePoint Online PowerShell


    Murugesa Pandian,

    Gear up for some solid action by doing IT not saying IT.
    
    More insight @ Intelliview

    Saturday, May 18, 2019 5:05 AM
  • Hi Murugesa

    That is helpful - and which module should I install and how to install please?

    Thanks so much!

    Saturday, May 18, 2019 6:21 PM
  • Hi, ran009,

    You can download SharePoint Online management Shell here: https://www.microsoft.com/en-us/download/details.aspx?id=35588

    Or installing module from the PowerShell Gallery: https://www.powershellgallery.com/packages/Microsoft.Online.SharePoint.PowerShell/16.0.8029.0

    Once installed, the module is available for use, and you do not need to install it again until you need features introduced in a later version.

    For more information about getting started with SharePoint Online Management Shell, please check this: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps

    Best Regards

    Jerry Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, May 20, 2019 3:20 AM
  • Hi,

    When I try to install Module, it says this is an untrusted repository? Is there any official Microsoft alternative?

    (Recap: I need the module to be able to run connect-sposervice)

    Thanks.

    PS C:\WINDOWS\system32> Install-Module -Name Microsoft.Online.SharePoint.PowerShell -RequiredVersion 16.0.8029.0
    
    Untrusted repository
    You are installing the modules from an untrusted repository. If you trust this repository, change its
    InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
    'PSGallery'?
    

    Monday, May 20, 2019 6:23 PM
  • Hi, ran009,

    The PowerShell Gallery source is directly referred in MS official doc. If you still have concerns about it, you can download the SharePoint Online Management Shell from MS download center here: https://www.microsoft.com/en-us/download/details.aspx?id=35588

    The SharePoint Online Management Shell is a tool that contains a Windows PowerShell Module to manage your SharePoint Online subscription in the Office 365. 

    Before using it, please read the article about getting started with SharePoint Online Management Shell I posted above.

    Best Regards

    Jerry Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Tuesday, May 21, 2019 1:32 AM
  • Hi,

    You can ignore this security warning as you are connecting the Microsoft repository.


    Murugesa Pandian,

    Gear up for some solid action by doing IT not saying IT.
    
    More insight @ Intelliview

    Tuesday, May 21, 2019 7:40 AM
  • Hi, ran009,

    Have you tried the solution? Is there any update about your concerns?

    Best Regards

    Jerry Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, May 23, 2019 8:20 AM