Thursday, June 23, 2011

PowerShell commands for SharePoint 2010

>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

No comments:

Post a Comment