If we need to add a solution file to SharePoint 2007, we use stsadm command as following:
stsadm –o addsolution –name SharePointProject.wsp
In SharePoint 2010, the powershell command is as following:
Add-SPSolution c:\SharePointProject.wsp
In this case you don’t actually have to type –literalpath before the parameter. This is what it looks like when executed. You can see that it displays the id of the solution along with its deployment status.
After you add solution package to server farm, you can deploy in central administartion->System setting->farm solution management.
If you retract your solution fail by central administration page, you can use power shell tool to retract your solution. However, powershell doesn't have retract command anymore. Please use uninstall.
Uninstall-SPSolution –Identity SharePointProject.wsp –WebApplication http://sp2010
If you just need to update your solution file, you can use this code as following:
Update-SPSolution –Identity SharePointProject.wsp –LiteralPath c:\SharePointProject.wsp –GACDeployment
沒有留言:
張貼留言