Working with SharePoint Online Management Shell

In this post we will discuss how to work with SharePoint online management shell in SharePoint online Office 365.

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

First download SharePoint Online Management Shell from this MSDN URL. Choose the language and click on Download.

SharePoint Online Management Shell

SharePoint Online Management Shell

Then it will ask to download either 64-bit version or 32 bit version. Choose the 64-bit version and then click on Next, which will download the msi file.

Choose the download you want

Choose the download you want

Now double click on the msi file and click on Run like below:

Security Warning

Security Warning

Then in the SharePoint Online Management Shell Setup, accept the license agreement and then click on Install.

License Agreement

License Agreement

Then the installation will progress like below:

Updating component registration

Updating component registration

t

Once the installation is over, it will show the Installation completion wizard like below:

Setup Wizard

Setup Wizard

Once the installation over, you can search for “SharePoint Online Management Shell” and you will find the tool.

SharePoint Online Management Shell

SharePoint Online Management Shell

Now you can run the below SharePoint online management shell cmdlets.

We can use Connect-SPOService cmdlets to connecto to SharePoint online site. Remember we need to provide the admin site url https://<tenantid>-admin.sharepoint.com .

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

Administrator: SharePoint Online Management Shell

Administrator: SharePoint Online Management Shell

Then it will ask for your credentials like below:

SharePoint Online PowerShell

SharePoint Online PowerShell

Once it is connected successfully, we can run SharePoint online powershell cmdlets.

Lets first run Get-SPOSite, which will display all the site collections in Office 365 SharePoint Online.

Connect

Connect

Once your work is over, you should use below command to disconnect from Office 365 like below:

Disconnect-SPOService

The above command will clears an existing connection.

Run SharePoint Online PowerShell cmdlets using PowerShell ISE:

We can run the SharePoint online management cmdlets using PowerShell ISE.

We need to run the below command.

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

Hope this article will be helpful.

About the Author: 

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 EnjoySharePoint.com

Reference:

Kumar, B (2018). Working with SharePoint Online Management Shell. Available at: https://www.sharepointsky.com/sharepoint-online-management-shell/ [Accessed 10 September 2018]
Share this on...

Rate this Post:

Share: