1. Add the solution
stsadm -o addsolution -filename {WSPFILENAME}
2. Deploy the solution
stsadm -o deploysolution -name {WSPFILENAME} -url {SITEURL}
3. Install the feature
stsadm -o installfeature -filename {FeatureFolder}\feature.xml
4. Activate the feature
stsadm -o activatefeature -id {FEATUREID} -url {SITEURL} -force
5. Deactive the feature
Stsadm.exe -o deactivatefeature -filename “C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES\MyFeature\feature.xml” -ur http://myserver-SP1:2010/
6.Uninstall the feature
stsadm -o uninstallfeature -filename
7.Retract Solution
stsadm -o retractsolution -name [-url] [-allcontenturls] [-time] [-immediate]
8.Delete Solution
stsadm -o deletesolution -name
当你在Sharepoint Farm的一个台服务器上部署了指定的Feature后,SPTimer服务会自动 synchronise/deploy (同步/部署)这个solution到此Farm中其它服务器上。
强制部署
之前部署了某解决方案,重新安装的话,没问题,但部署时就会报类似如下的错误:
"此功能已在此服务器场中安装 ID 为 2cf57215-0997-47ff-a9fa-3c7bd3716699 的功能。请使用强制属性显式地重新安装。"
在VS里用DebugDeploy生成的时候,仔细看一下“输出”发现:
Stsadm –o deploysolution…的时候,后面没有 –force,
stsadm -o addsolution -filename [wsp文件路径]
示例:stsadm -o addsolution -filename C:\SharePoint.Notice.wsp
部署:部署该解决方案至指定站点
stsadm -o deploysolution -name [wsp名称] -immediate -url [要发布的站点] -allowGacDeployment
示例:stsadm -o deploysolution -name SharePoint.Notice.wsp -immediate -url http://dct -allowGacDeployment
回收:从指定站点回收该解决方案,但解决方案仍在SharePoint解决方案中
stsadm -o retractsolution -name [wsp名称] -immediate -url [要回收的站点]
示例:stsadm -o retractsolution -name SharePoint.Notice.wsp -immediate -url http://dct
删除:从SharePoint 中删除该解决方案
stsadm -o deletesolution -name [wsp名称]
示例:stsadm -o deletesolution -name SharePoint.Notice.wsp
更新:直接更新某站点下的解决方案(前提是被更新的解决方案已存在,无需回收和删除操作)
stsadm.exe -o upgradesolution -name [wsp名称] -filename [wsp文件路径] -immediate -allowGacDeployment
示例:stsadm.exe -o upgradesolution -name SharePoint.BBS.wsp -filename C:\SharePoint.BBS.wsp -immediate -allowGacDeployment
guodian
stsadm.exe -o upgradesolution -name SharePointProjectDemo.wsp -filename D:\solution\SharePointProjectDemo.wsp -immediate -allowGacDeployment
Add-SPSolution -LiteralPath "c:\dct.wsp"
Get-SPSolution
possible errors:
Error Solution
Install-SPSolution : Admin SVC must be running in order to create deployment timer job. Open services.msc and start the service named SharePoint 2010 Administration.
Install-SPSolution : A deployment or retraction is already under way for the solution "webpartmanualdeployment.wsp", and only one deployment or retraction at a time is supported.
Go to Central Administration > System Settings > Manage farm solutions > Cancel / Retract the particular solution
Install-SPSolution -Identity ilt.wsp -WebApplication http://dct:8080 -GACDeployment
插曲, 当部署到指定Web Application 遇到错误的时候, 要建一个Dummy data, 制定DeploymentTarget 为 WebApplication: 参考:http://sharedpointers.blogspot.in/2011/03/deploying-solutions-to-specific-web.html
即:
1.Double click the package
2.Open the Advanced
3.add an additional assembly (the solution for example) and mark Deployment Type "Web Application"
4. 更新、升级已部署的Solution
Update-SPSolution -Identity ilt.wsp -LiteralPath "C:\ilt.wsp" -GACDeployment
5.卸载已部署的Solution
Uninstall-SPSolution -Identity ilt.wsp
Web Application 级别的:
Uninstall-SPSolution -Identity ilt.wsp -WebApplication http://dct:8080
6.移除已卸载的Solution
Remove-SPSolution -identity ilt.wsp
sharepoint power shell 强行部署
Install-SPSolution -Identity HHSD_MOSS.wsp -AllWebApplications -GACDeployment -force
参加地址
http://technet.microsoft.com/en-us/library/cc262995(v=office.14).aspx
sharepoint 2013 现实出错误提示。
1. 在当前网站端口目录下的Web.config修改
例如80端口的站点路径为:C:\inetpub\wwwroot\wss\VirtualDirectories\80
(1)将
(2)将
(3)将
2.在“Layouts位置(SharePoint发布页面)”的路径下的Web.config修改
具体位置:C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS
(1)将