Sunday, September 25, 2011

PowerShell commands for SharePoint 2010

PowerShell commands for SharePoint 2010 To find the PowerShell commands n SharePoint 2010, try these:
>Get-Command -Noun SPSite
You can get the all PowerShell commands:
>Get-Help Get-SPSite
You can get the Name, Syntax, Description, Related Links, Remarks
To Retrieve content database for a specific site collection:
>Get-SPContentDatabase -Site http://SPServer01
Results:
ID:96dfa345-43df-3edg-bbc6-1l4e8ee105le
Name:WSS_content
Web Application:SPWeb Application Name=Sharepoint - 80
Server:SPServer01
CurrentSiteCount
:2

To retrieve the content database for a specific Web Application:
>Get-SPContentDatabase -WebApplication "Sharepoint - 80"
Results:
ID:96dfa345-43df-3edg-bbc6-1l4e8ee105le
Name:WSS_content
Web Application:SPWeb Application Name=Sharepoint - 80
Server:SPServer01
CurrentSiteCount
:2
I hope this tip helps someone else save time and frustration as it did for me.

No comments:

Post a Comment

Posting is provided "AS IS" with no warranties, and confers no rights.