PowerShell, SharePoint

SharePoint 2010 Basic PowerShell Commands

Here are some basic PowerShell commands for adding, deploying, installing and activating SharePoint 2010 solutions and features.

Stsadm Command PowerShell Equivalent
stsadm –o addsolution –name MySharePointSolution.wsp Add-SPSolution c:SolutionsMySharePointSolution.wsp
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://server –allowgacdeployment –immediate Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://server -GACDeployment
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename MySharePointSolution.wsp –immediate –allowgacdeployment Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath c:SolutionsMySharePointSolution.wsp –GACDeployment
stsadm -o installfeature -name MyFeature Install-SPFeature -Path “MyFeature”
stsadm -o activatefeature -name MyFeature Enable-SPFeature -Identity “MyFeature”
stsadm -o deactivatefeature -name MyFeature Disable-SPFeature -Identity “MyFeature”
stsadm -o uninstallfeature -name MyFeature Uninstall-SPFeature -Path “MyFeature”
stsadm -o retractsolution -name MySharePointSolution.wsp –url http://server Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://server
stsadm -o deletesolution -name MySharePointSolution.wsp Remove-SPSolution –Identity MySharePointSolution.wsp
stsadm -o execadmsvcjobs Start-SPAdminJob

Further reading

Whole list of mappings between old stsadm and new PowerShell commands
http://technet.microsoft.com/en-us/library/ff621081.aspx

A bit more about PowerShell in SharePoint 2010
http://blog.falchionconsulting.com/index.php/2009/10/sharepoint-2010-stsadm-and-powershell/

Nazaj na seznam

Related Posts

One thought on “SharePoint 2010 Basic PowerShell Commands

  1. […] « SharePoint 2010 Basic PowerShell Commands How to display custom field in content query web part […]

Dodaj odgovor

Vaš e-naslov ne bo objavljen. * označuje zahtevana polja