Home > SharePoint > Stsadm and PowerShell Commands to Add , Deploy/Install , Retract/Uninstall and Delete/Remove SharePoint Solution.

Stsadm and PowerShell Commands to Add , Deploy/Install , Retract/Uninstall and Delete/Remove SharePoint Solution.

I think this is good time to post stsadm and PowerShell commands for adding , deploying/Installing , retracting/uninstalling and removing SharePoint solutions (wsp).

Commands are quiet similar just with different names. PowerShell works on SharePoint 2010 where as stsadm works on both SharePoint 2007 and SharePoint 2010.

Stsadm Commands

Stsadm commands are executed from hive/bin.

Add Solution :

stsadm.exe -o addsolution -filename “complete name of SharePoint solution with extension”

For example :

stsadm.exe -o addsolution -filename “SharePoint.CustomProject.wsp”

Deploy Solution :

stsadm.exe -o deploysolution -name “complete name of SharePoint solution with extension” -immediate  -allowGacDeployment

For example :

stsadm.exe” -o deploysolution -name “SharePoint.CustomProject.wsp” -immediate  -allowGacDeployment

Retract Solution :

stsadm.exe” -o retractsolution -name “complete name of SharePoint solution with extension” –immediate

For example :

stsadm.exe” -o retractsolution -name “SharePoint.CustomProject.wsp” –immediate

Delete Solution :

stsadm.exe” -o deletesolution -name “complete name of SharePoint solution with extension”

For example :

stsadm.exe” -o deletesolution -name “SharePoint.CustomProject.wsp”

 

PowerShell Commands

Run SharePoint 2010 Management Shell.

Add

Add-SPSolution “complete path where wsp file exist/solution name”

For example :

Add-SPSolution c:\Users\Administrator\Desktop\SharePoint.CustomProject.wsp

Install

Install-SPSolution –Identity “solution name”  –AllWebApplications –GACDeployment

For example :

Install-SPSolution –identity SharePoint.CustomProject.wsp –AllWebApplications –GACDeployment

Uninstall

Uninstall-SPSolution –Identity “solution name” –AllWebApplications

For Example :

                Uninstall–SPSolution –Identity SharePoint.CustomProject.wsp – AllWebApplications

Remove

Remove-SPSolution –Identity “solution name”

For Example :

                Remove-SPSolution –Identity SharePoint.CustomProject.wsp

Advertisements
  1. Syed Shoaib Adil
    December 19, 2012 at 3:18 pm

    Nice one…. but one thing I need u to correct is… PowerShell not only works on SP2010… its also available for SP2007.
    Good effort by the way…

  1. No trackbacks yet.

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

%d bloggers like this: