Excel at SharePoint Online Management Shell

Any developer / Admin will land on to SharePoint online management shell to perform any operation. So I would like to bring an easy way to make our day-in- day life easy with the below list of commands.

Ensure that you have installed the latest version of SPO Management shell.

If you are new to SharePoint Online Management Shell, read the below two SharePoint Online management shell tutorials:

First thing first, with the below command we will get the latest / updated help from MS. So, please run this command for hassle-free scripting.

SharePoint online management shell
Importing Help from Microfost for SPO Management Shell

Now that we installed/ensured the latest management shell on your machine, we are good to start our marathon to Mars 🙂 with the below commands list.

Before we start anything I would like to give 2 important tips which help us to make our journey smooth and hassle free.

  1. How to get for a command
  2. Samples/examples for the command
SharePoint online management shell
Get command help and Examples

Below is the list of areas I would like to emphasize more in this article.

  • User operations
  • Organizing Lists / sites
  • Managing services

List of the below commands to organize the users in SPO

  • Add-SPOUser
  • Export-SPOUserInfo
  • Export-SPOUserProfile
  • Get-SPOUser
  • Get-SPOUserAndContentMoveState
  • Get-SPOUserOneDriveLocation
  • Remove-SPOUser
  • Remove-SPOUserInfo
  • Remove-SPOUserProfile
  • Revoke-SPOUserSession
  • Set-SPOUser
  • Start-SPOUserAndContentMove
  • Stop-SPOUserAndContentMove
  • Set-SPOUser
  • Start-SPOUserAndContentMove
  • Stop-SPOUserAndContentMove

To organize the site we can refer the below:


Below is the list to organize various services

  • Get-Service
  • New-Service
  • Restart-Service
  • Resume-Service
  • Set-Service
  • Start-Service
  • Stop-Service
  • Suspend-Service
  • Set-Service
  • Start-Service
  • Stop-Service
  • Suspend-Service
  • Connect-SPOService
  • Disconnect-SPOService

you can also check the sharepoint version by executing the below command.

Get-SPFarm | Select BuildVersion

You may like following SharePoint Online management shell tutorials:

Hope this helps you to expedite your scripting in SharePoint online !!!

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.