SharePoint 2013 Powershell 部署命令

sharepoint 2013 
一.用SharePoint Powershell命令部署

1.iisreset 回收应用程序池
2.disable-spfeature -identity "XXX" -url -force 停用功能
e.g.C:\PS>$w = Get-SPWeb http://*** | ForEach{ $_.URL }
C:\PS>Get-SPFeature -Web $w |%{ Disable-SPFeature -Identity $_ -URL $w}
3.Uninstall-SPSolution -Identity ***.wsp -WebApplication http://*** -GACDeployment 收回部署包
Web Application 级别的:
Uninstall-SPSolution -Identity aZaaS.KStar.Sharepoint.Portal.wsp -WebApplication http://sp2013:31996


4.Remove-SPSolution -Identity ***.wsp 删除部署包
5.Add-SPSolution “D:\ES Deploy\***.wsp“ 添加解决方案包
如果是沙河解决方案 add-SPUserSolution -LiteralPath c:\***.wsp -Site http://sitename
6.Install-SPSolution -Identity ***.wsp -GACDeployment -WebApplication http://*** 部署解决方案包
7.enable-spfeature -identity "XXX" -url 激活功能
也可以直接更新部署包(没怎么用过,因为都是按VS的部署步骤操作)
8.Uninstall-SPSolution –Identity MySharepointProject.wsp –WebApplication http://myserver-sp1:2010/

vs 2013 输出的部署过程

回收 IIS 应用程序池:
2> 正在回收 IIS 应用程序池“SharePoint - 8090”...
2> 收回解决方案:
2> 正在停用功能“X.XX.Sharepoint.Portal_webParts”...
2> 正在收回解决方案“XXX.wsp”...
2> 正在删除解决方案“XXX.wsp”...
2> 添加解决方案:
2> 已找到 25 个部署冲突。 正在解决冲突...
2> 已从服务器中删除文件“http://abcsite:8090/_catalogs/wp/ucSPListAdminWebPart.webpart”。

...

...

...
2> 正在添加解决方案“XXX.wsp”...
2> 正在部署解决方案“XXX.wsp”...
2> 激活功能:
2> 正在激活功能“webParts”...
2> 由于未指定后期部署命令,将跳过部署步骤。
========== 生成: 成功 1 个,失败 0 个,最新 1 个,跳过 0 个 ==========
========== 部署: 成功 1 个,失败 0 个,跳过 0 个 ==========

原文地址:https://www.cnblogs.com/jackalliu/p/4494648.html