How to connect to SharePoint online site using SharePoint Online Management Shell?

SharePoint Online PowerShell
InfoPath alternatives for form designing SharePoint

In this post we will discuss how we can connect to SharePoint online office 365 site using SharePoint Online Management Shell. We need to download and install in each system from which you want to connect to your SharePoint online from PowerShell.

We can use SharePoint Online Management Shell to manage SharePoint Online users, sites, and site collections, lists, libraries etc. SharePoint Online Management Shell commands differs from Office 365 Commands. Office 365 commands manage Office 365-level tasks such as users, licenses, organization information, and services.

Regarding permission, to use SharePoint Online PowerShell commands, you must be a SharePoint Online global administrator.

To use SharePoint online management shell we need to download and install SharePoint Online Management Shell.

First download SharePoint Online Management Shell from this msdn url.

Also you can read:
– Retrieve term store data including Labels using .Net managed object model in SharePoint Online

– How to deploy WebJob to Microsoft Azure using Upload zip file method in SharePoint Online?

– How to use client side People Picker control in SharePoint online Office 365?

Click on the download button and then choose the particular version (64 bit or 32 bit).

Then click on the installer to install.

SharePoint Online Management Shell
SharePoint Online Management Shell

Once it is install successfully, it will show the completion wizard.

After this if you will search for “SharePoint Online Management Shell”, we can see the management shell available.

connect to sharepoint online site using powershell
connect to sharepoint online site using powershell

Now you can open the SharePoint online management shell and run the below command to connect to SharePoint Online.

Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com -credential ******@onlysharepoint2013.onmicrosoft.com

Once you run the command it will ask for Password and then it will connect to SharePoint online site. Remember the user must be a SharePoint Online global administrator to use SharePoint Online PowerShell commands.

SharePoint Online PowerShell
SharePoint Online PowerShell
how to connect sharepoint online management shell
how to connect sharepoint online management shell

Connect to SharePoint Online Site using Windows PowerShell ISE:
We can also connect to SharePoint Online Office 365 sites using Windows PowerShell ISE. For that we have to import “Microsoft.Online.SharePoint.PowerShell” like below:

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

And then we can use the Connect-SPOService command like below:

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com -credential ***@onlysharepoint2013.onmicrosoft.com

Once you run the above command, it will ask for the password and once you enter password and click on OK, it will connect to the site.

connect sposervice could not connect to sharepoint online

connect sposervice could not connect to sharepoint onlineHope this will be helpful.

Similar SharePoint 2013 Tutorials

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply