Thursday, 30 July 2015

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



No comments:

Post a Comment