So, now, we’re moving over to SharePoint PowerShell, right. Formerly, we used STSADM from a command prompt. Therefore, here are the old and new commands for solution management, to do the following:
Add a Solution
Deploy a Solution
Retract a Solution
Delete a Solution
The STSAdm commands were:
Add Solution:
stsadm –o addsolution –filename D:\YourPath\YourSolutionName.wsp
Deploy Solution:
stsadm –o deploysolution –name YourSolutionName.wsp –url http://YourWebApp –immediate
PowerShell commands:
Add Solution:
add-SPSolution D:\YourPath\YourSolutionName.wsp
Deploy Solution:
Install-SPSolution YourSolutionName.wsp –WebApplication http://YourWebApp
And, naturally, if your solution is installing a DLL (to the GAC), you would need to add the following attribute:
-GacDeployment
For Retracting and Deleting, the STSAdm commands were:
Retract a Solution:
stsadm –o retractsolution –name YourSolutionName.wsp -url http://YourWebApp -immediate
Delete aSolution:
stsadm –o deletesolution –name YourSolutionName.wsp
PowerShell commands:
Retract Solution:
Uninstall-SPSolution -Identity YourSolutionName.wsp -WebApplication http://YourWebApp
Delete Solution:
Remove-SPSolution -Identity YourSolutionName.wsp
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.