SharePoint 2010 Administration PowerShell Sheet

Written by Denis Stadler on . Posted in IT Pro & PowerShell, SharePoint 2010

There are 652 SharePoint Server 2010 PowerShell cmdlets. Please find bellow a short list with the ones that I use.

Before starting please verify that you meet the following minimum requirements:
1. Your user account is a member of the SharePoint_Shell_Access role on the configuration database.
2. Your user account is a member of the WSS_ADMIN_WPG local group on the computer where SharePoint Server 2010 is installed.

Please open SharePoint Server 2010 Management Shell. To acomplish this please follow the steps:
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint Server 2010 Products.
3. Click SharePoint Server 2010 Management Shell.

Application Management

Web Applications

To create a new Web Application using PowerShell just use:

New-SPWebApplication -Name <Name> -ApplicationPool <ApplicationPool> -ApplicationPoolAccount <ApplicationPoolAccount> -Port <Port> -URL <URL>

Create a Site Collection

To create a new Site Collection using PowerShell first you have to chose a template. To do that just use the following command to list all the templates available within SharePoint:


Then replace <template-name> with your selected template and use the following command to create the site collection:

$template = Get-SPWebTemplate <template-name>
-Url <URL for the new site collection>-OwnerAlias <domain\user> -Template $template

Delete a Site Collection

To delete a site collection use the following command:

Remove-SPSite -Identity <URL of the site collection> –GradualDelete

Service Applications

To manage Service Applications from PowerShell you have the know the service’s guid. To see all the guid’s in the farm use:


Then, for starting / stoping a service use:

Start-SPServiceInstance -Identity <service guid>

Stop-SPServiceInstance -Identity <service guid>

Add a Content Database to a Web Application

New-SPContentDatabase -Name <content database name> -WebApplication <web application url>

Site Management

Backup SharePoint Site

Backup-SPSite <http://sharepoint-url> -path “<c:\…>”

Restore SharePoint Site

Restore-SPSite <http://sharepoint-url> -path “<c:\…>”

To be updated…

Tags: , , , , , , , , , ,

Trackback from your site.

Denis Stadler

I'm a technology enthusiast, with more than 10 years of experience in SharePoint and Dynamics CRM projects. To find more details about, please visit the about me page.

Leave a comment