Introduction to the SharePoint Online Management Shell

 

Applies to: SharePoint Online

Topic Last Modified: 2016-08-09

Summary: Learn about using the SharePoint Online Management Shell to manage SharePoint Online users, groups, and sites.

You can use the SharePoint Online Management Shell to efficiently manage users, sites, and organizations in addition to using the SharePoint Online Administration Center.

Administrators should read this article if they want to do the following:

  • Learn about the SharePoint Online Management Shell.

  • More efficiently manage SharePoint Online users, sites, site collections, and organizations with SharePoint Online PowerShell commands.

The SharePoint Online Management Shell is a Windows PowerShell module that you can use to manage SharePoint Online users, sites, and site collections. Command-line operations in Windows PowerShell are composed of a series of commands. Each command uses a cmdlet and a set of settings known as parameters. For example, you use the New-SPOSite cmdlet for a command that creates a new SharePoint Online site with a specified title, URL, owner, storage quota, and template (the parameters).

SharePoint Online PowerShell commands can be very efficient for batch operations — for example, creating a dozen new sites or adding hundreds of new SharePoint Online users to a site. For more information, see Why you need to use Office 365 PowerShell.

The set of SharePoint Online Management Shell commands differs from the set of Office 365 for professionals and small businesses PowerShell commands. SharePoint Online Management Shell commands manage SharePoint Online users and sites, whereas Office 365 commands manage Office 365-level tasks such as users, licenses, organization information, and services. They both manage users and groups. However, Office 365 PowerShell commands manage users and groups for all of the Office 365 services. The SharePoint Online commands manage users and groups only for SharePoint Online.

If you are new to Office 365 and SharePoint Online and you have not done much managing of SharePoint sites or users, the SharePoint Online Administration Center is a good place to start.

After you get familiar with SharePoint Online sites and users, try using SharePoint Online commands, especially when you want to manage lots of users, sites, or site collections.

To use SharePoint Online PowerShell commands, you must be a SharePoint Online global administrator.

Before you can run SharePoint Online commands, you must install the SharePoint Online Management Shell module and connect to the SharePoint Online service. For more information, see Connect to SharePoint Online PowerShell.

The following table organizes the SharePoint Online Management Shell cmdlets by task and links to articles with detailed information about each cmdlet.

SharePoint Online Management Shell cmdlets

Task Cmdlet name

User management

Add-SPOUser

User management

Get-SPOUser

User management

Remove-SPOUser

User management

Set-SPOUser

User management

Get-SPOExternalUser

User group management

Get-SPOSiteGroup

User group management

New-SPOSiteGroup

User group management

Remove-SPOSiteGroup

User group management

Set-SPOSiteGroup

Site collection management

Get-SPODeletedSite

Site collection management

Get-SPOSite

Site collection management

New-SPOSite

Site collection management

Remove-SPODeletedSite

Site collection management

Remove-SPOSite

Site collection management

Repair-SPOSite

Site collection management

Restore-SPODeletedSite

Site collection management

Set-SPOSite

Site collection management

Test-SPOSite

Organization level monitoring and management

Get-SPOAppErrors

Organization level monitoring and management

Get-SPOAppInfo

Organization level monitoring and management

Get-SPOTenant

Organization level monitoring and management

Get-SPOTenantLogEntry

Organization level monitoring and management

Get-SPOTenantLogLastAvailableTimeInUtc

Organization level monitoring and management

Get-SPOWebTemplate

Organization level monitoring and management

Set-SPOTenant

Upgrade

Upgrade-SPOSite

Upgrade

Request-SPOUpgradeEvaluationSite

Service connection and disconnection

Connect-SPOService

Service connection and disconnection

Disconnect-SPOService

OneDrive sync client

Get-SPOTenantSyncClientRestriction

OneDrive sync client

Remove-SPOTenantSyncClientRestriction

OneDrive sync client

Set-SPOTenantSyncClientRestriction

Show: