I installed Sharepoint online management shell in my local computer, and I want to connect to the remote sharepoint server. But when I type the command, it is wrong.

enter image description here

I searched in some methods, one is to invoke this: Add-PSSnapin Microsoft.Sharepoint.Powershell

But I checked, there is no such dll in my gac. Shall I need to install something? Thank you very much.

Edit: I also tried this command, but it failed, either.enter image description here

2 Answers 2


The exact solution for your problem is that you need to import the sharepoint commands after installation.

Then type the required commands to connect to the online service. You also need to be tenant admin for your office 365 environment.

Pls refer the picture below with exact details.

enter image description here

  • 1
    Hi, the issue is fixed according to your method. THANKS!
    – Sun Robin
    Jul 31, 2015 at 1:54

SharePoint Online Management Shell has less amount of commands than it's version for on-premise. You can read all possible commands there: https://technet.microsoft.com/en-us/library/fp161397.aspx If you want to connect to service, you have to start from this command: Connect-SPOService But you have to be a global administrator in Office 365 https://support.office.com/en-us/article/Introduction-to-the-SharePoint-Online-Management-Shell-c16941c3-19b4-4710-8056-34c034493429

If you want to get Web, I suggest you to use CSOM from powershell. Client Object Model gives you more wide functional for managing your sites.

  • Hi, I tried Connect-SPOService, but it also failed. Could you help check? Thanks.
    – Sun Robin
    Jul 30, 2015 at 1:37
  • 1
    its not a relevant answer. for this problem he needs to import the commands first as i mentioned in the below answer.
    – kesava
    Jul 30, 2015 at 3:05
  • 1
    The user is really asking why it's not working to connect to Offce 365. Sending links is not the answer to the question. You need to revise the answer and explain how to connect, and not give a general answer on what commands are available. Down vote from me.
    – Benny Skogberg
    Jul 30, 2015 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.