PowerShell Command List used in SharePoint 2010

PowerShell Command which are common in use for a SharePoint Developer.

Backup
Backup-SPSite http://oldsite -Path C:\backup\sitename.bak

Restore
Restore-SPSite http://newsite -Path C:\backup\sitename.bak

Add WSP
Add-SPsolution "C:\File1.wsp"

Update WSP
Update-SpSolution -Identity File1.wsp -LiteralPath "C:\File1.wsp" -GACDeployment

Install WSP
Install-SPSolution -Identity "File.wsp"  -WebApplication "http://siteurl"

EnableFeature
Enable-SPFeature -identity "MyFeature" -URL "http://siteurl"

Disable Feature
Disable-SPFeature -identity "MyFeature" -URL "http://siteurl"

InstallFeature
Install-SPFeature -path "MySPFeature1"

Uninstall Feature
Uninstall-SPFeature -Identity "MySPFeature1"

Get Farm ID
(Get-SPFarm).Id



Comments

Popular posts from this blog

CAML Query in SharePoint 2010

Calling REST APi from server side code - C#

All about SharePoint 2010 Content Type Hub

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX