SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can connect to SharePoint online to run some PowerShell commands? It would be nice if someone has drilled down the steps for me :)

share|improve this question
up vote 5 down vote accepted

Connecting to SharePoint Online

Before you connect to SharePoint Online, you’ll need to have the username and password for an account with global administrator permissions. You’ll also need to know your tenant admin URL (i.e.: When connecting to SharePoint Online, don’t forget to reference all URLs securely using https. If you try and use http, you will get an error. To connect to SharePoint Online, use the Connect-SPOService command. It takes the URL to your tenant admin and a username. When you connect, you’ll be prompted for your password. Connect-SPOService –Url –Credential

enter image description here

If you connect successfully, you will be returned to the command prompt without error. To see what commands are available, we can use Get-Command and pass it the module Microsoft.Online.SharePoint.PowerShell.dll

For more information check this link out,

Hope it helps.

share|improve this answer

please refer to these two links form msdn!

shows everything you need to know about sharepoint online and powershell

and your issue

how to setup powershell for sharepoiont online

  1. Install Windows PowerShell 3.0 from Windows Management Framework 3.0.

  2. Install the SharePoint Online Management Shell from the Microsoft Download Center.

  3. Click Start>All Programs>SharePoint Online Management Shell.

  4. Run Connect-SPOService. For example, Connect-SPOService -Url -credential, where:
    • Url is the URL of the SharePoint Online Administration Center.

    • Credential is the user name to which you want to grant access to the SharePoint Online Administration Center site.

  5. Try it out! For example, run Get-SPOSite to get a list of all sites.

hope it helps :)

share|improve this answer

Maybe a bit late but you can use the project Client-Side SharePoint Powershell as a PowerShell API to SharePoint Online. The features still need to grow, but you can extend it yourself pretty easy and otherwise just request some features.

share|improve this answer
  1. You need to install PowerShell depending on the bitness of your windows.
  2. Install Microsoft Online Services Sign-In Assistant for IT Professionals
  3. install Windows Azure Active Directory Module for Windows PowerShell

and test it.

Reference & for more details:

share|improve this answer
So sorry, wrong url pasted above. correct one is:… – zaminator Feb 17 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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