当前位置: 代码迷 >> SharePoint >> SharePoint 命令 装配、部署、回收、删除、更新 wsp包 (Solution)
  详细解决方案

SharePoint 命令 装配、部署、回收、删除、更新 wsp包 (Solution)

热度:616   发布时间:2016-05-02 06:53:28.0
SharePoint 命令 安装、部署、回收、删除、更新 wsp包 (Solution)

 首先打开“SharePoint Management Shell”,如下图:

在上面的命令窗口执行以下命令,实现所需:

  1. 添加: 添加至SharePoint 解决方案

    stsadm -o addsolution -filename [wsp文件路径]

    示例:stsadm -o addsolution -filename C:\SharePoint.Notice.wsp

  2. 部署:部署该解决方案至指定站点

    stsadm -o deploysolution -name [wsp名称] -immediate -url [要发布的站点] -allowGacDeployment

    示例:stsadm -o deploysolution -name SharePoint.Notice.wsp -immediate -url http://hkc -allowGacDeployment

  3. 回收:从指定站点回收该解决方案,但解决方案仍在SharePoint解决方案中

    stsadm -o retractsolution -name [wsp名称] -immediate -url  [要回收的站点]

     

    示例:stsadm -o retractsolution -name SharePoint.Notice.wsp -immediate -url  http://hkc

  4. 删除:从SharePoint 中删除该解决方案

    stsadm -o deletesolution -name [wsp名称]

    示例:stsadm -o deletesolution -name SharePoint.Notice.wsp

  5. 更新:直接更新某站点下的解决方案(前提是被更新的解决方案已存在,无需回收和删除操作)

    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

  相关解决方案