How to Connect PowerShell to SharePoint Online

Prerequisites:

  1. Have access to SharePoint Online as Administrator (Global Admin or SharePoint Online Administrator. Don’t already have access? Get free try for one month at https://products.office.com/en-us/try
  2. Install the Windows PowerShell 3.0 from Windows Management Framework 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=34595
  3. Install SharePoint Online Management Shell
    https://www.microsoft.com/en-us/download/details.aspx?id=35588.
  4. Know your tenant name.  You will need to use it in step 3 below.

Steps:

  1. Launch Windows PowerShell or Windows PowerShell ISE
  2. Execute cmdlet Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
  3. Connect-SPOService -url https://<tenant>-admin.sharepoint.com (you will be prompted for your Office 365 credential.)
  4. Get-SPOSite should show all Site Collections provisioned.  If not, something did not go right for your in step 1 to 3.

Congrats, you now have access to all SharePoint Online PowerShell commands to manage SharePoint Online in Office 365.

Reference:

https://technet.microsoft.com/en-us/library/fp161362.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s