PowerShell Commands – Deploy Features

I’ve used the STSADM commands within SharePoint for many, many years, and with a lot more SharePoint 2010 activity, I’m deliberately forcing myself to use the PowerShell alternative.

The “deploy” and “activate” feature commands are probably the MOST used (for me, at least) – so the equivalent commands are these ones ;

(1) Add Solution

STSADM :

  • stsadm –o addsolution –filename “D:DeployMySharePointSolution.wsp“

PowerShell :

  • Add-SPSolution “D:DeployMySharePointSolution.wsp“

(2) Deploy Solution

STSADM :

  • stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate

PowerShell :

  • Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment

(3) Activate Feature

STSADM :

PowerShell :

Check out this link from Patrick Boom – he also covers Retract, Delete and Deactivate.

Advertisements

One thought on “PowerShell Commands – Deploy Features

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s