First open the SharePoint Management Shell, such as:
Execute the following command in the command window above to achieve the desired:
Add: Add to SharePoint Solution
Stsadm-o addsolution-filename [wsp file path]
Example: Stsadm-o addsolution-filename C:\SharePoint.Notice.wsp
Deploy: Deploy the solution to a specified site
Stsadm-o Deploysolution-name [wsp name]-immediate-url [site to publish]-allowgacdeployment
Example: Stsadm-o deploysolution-name sharepoint.notice.wsp-immediate-url http://hkc-allowGacDeployment
Recycle: Recycle the solution from a specified site, but the solution is still in SharePoint solutions
Stsadm-o Retractsolution-name [wsp name]-immediate-url [site to recycle]
Example: Stsadm-o retractsolution-name sharepoint.notice.wsp-immediate-url HTTP://HKC
Delete: Remove the solution from SharePoint
Stsadm-o Deletesolution-name [wsp name]
Example: Stsadm-o deletesolution-name SharePoint.Notice.wsp
Update: Directly update the solution under a site (provided that the updated solution already exists without recycling and deletion)
Stsadm.exe-o Upgradesolution-name [wsp name]-filename [wsp file path]-immediate-allowgacdeployment
Example: Stsadm.exe-o upgradesolution-name sharepoint.bbs.wsp-filename C:\SharePoint.BBS.wsp-immediate- Allowgacdeployment
SharePoint commands Install, deploy, recycle, delete, update WSP packages (solution)