Export (0) Print
Expand All

Introduction to the SharePoint Online management shell

 

Applies to: SharePoint Online Preview

Topic Last Modified: 2013-12-18

Summary: Learn about using Windows PowerShell cmdlets to manage SharePoint Online users, groups, and sites.

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

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

  • Learn about Office 365 for professionals and small businesses, SharePoint Online, or Windows PowerShell.

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

SharePoint Online Management Shell is a Windows PowerShell module that you can use to efficiently manage SharePoint Online users, sites, site collections, and organizations. Command-line operations in Windows PowerShell are composed of cmdlets. A cmdlet, pronounced "command-let," is a verb-noun pair that is always separated by a hyphen (-) without spaces. The verb refers to the action that the cmdlet takes. The noun refers to the object on which the cmdlet takes action. Cmdlets are especially efficient for batch operations — for example, adding hundreds of new SharePoint Online users.

NoteNote:
You can use the Get-Command cmdlet to list all cmdlets, and use the Get-Help cmdlet to learn about any cmdlet. For more information, see Get-Command and Get-Help.

The Windows PowerShell Command Builder tool helps you quickly understand and use Windows PowerShell cmdlets for SharePoint Online. Let us say that you want to create a site. You can use the Command Builder tool to create the correct syntax to perform the task. After you choose a verb, such as Add, the tool filters the cmdlets that begin with that verb and shows you nouns, such as Site. You can download the Command Builder tool and install it on your desktop. For more information, see Windows PowerShell Command Builder Getting Started Guide.

The set of SharePoint Online Management Shell cmdlets differs from the set of Office 365 for professionals and small businesses cmdlets. SharePoint Online Management Shell cmdlets manage SharePoint Online users and sites, whereas Office 365 cmdlets manage Office 365 level tasks such as domain, license, organization information, and services. They both manage users and groups. However, Office 365 users and groups are not only for SharePoint Online services, but also for Exchange Online and Lync Online Services.

If you have not used 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. For more information about the SharePoint Online Administration Center, see SharePoint Online Administration Center Guide.

After you get familiar with SharePoint Online features and technologies, go ahead and use Windows PowerShell cmdlets. Especially when you want to manage lots of SharePoint Online users, sites, or site collections, SharePoint Online Management Shell cmdlets are the choice.

To run the SharePoint Online Management Shell cmdlets, you have to be a SharePoint Online global administrator.

NoteNote:
A SharePoint Online site administrator cannot use any cmdlets unless he or she is a global administrator in Office 365.

Before you can run cmdlets, you have to set up the SharePoint Online Management Shell environment and connect to the service. For more information, see Set up the SharePoint Online Management Shell Windows PowerShell environment.

After you set up the environment, you have to run Connect-SPOService before you can manage the users and site collections. If you haven't run Connect-SPOService, you'll get an error message that no connection is available. Let's say your user name is admin@contoso.com and you want to connect to the SharePoint Online Administration Center for Contoso.com. You run the following command:

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com

The following table organizes cmdlets by task and gives links to 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 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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft