sharepoint WSP安装包安装、删除、更新

1、普通WSP包,没有特殊激活内容

 安装BBA.WebParts.wsp
 1)   Add-SPSolution -LiteralPath "c:\BBA.WebParts.wsp"
 2)   Install-SPSolution -Identity "BBA.WebParts.wsp" -WebApplication http://server:8299  -GACDeployment

 更新WSP:  Update-SPSolution –Identity "BBA.WebParts.wsp"  –LiteralPath "c:\BBA.WebParts.wsp"  –GACDeployment -force

 删除WSP:  管理中心---系统设置---管理场解决文案: 先收回XXX.wsp 再删除解决方案

 

2 自定义定时器WSP安装 ,有特殊激活内容

  安装  AutoSenArvatodMailJob.wsp

 1)   Add-SPSolution -LiteralPath "c:\AutoSendMailJob.wsp"
 2)   Install-SPSolution -Identity "AutoSendMailJob.wsp" -WebApplication http://server:8299  -GACDeployment
 3)   iisreset

4) Disable-SPFeature -Identity "AutoSendMailJob_Feature2" -Url "http://server:8299/sites/bba"
 5)   Enable-SPFeature -Identity "AutoSendMailJob_Feature2" -Url "http://server:8299/sites/bba
 6)  net stop SPTimerV4 
 7)   net start SPTimerV4

 更新 AutoSenArvatodMailJob.wsp

1) Disable-SPFeature -Identity "Arvato.BBA.AutoSendMailJob_Feature2" -Url "http://10.200.8.11:8299/sites/bba"
2) Uninstall-SPSolution –Identity "Arvato.BBA.AutoSendMailJob.wsp" -WebApplication " http://10.200.8.11:8299" -Confirm:$false 
3) Remove-SPSolution –Identity Arvato.BBA.AutoSendMailJob.wsp -Confirm:$false
4) Add-SPSolution -LiteralPath "c:\Arvato.BBA.AutoSendMailJob2.wsp"
5) Install-SPSolution -Identity "Arvato.BBA.AutoSendMailJob.wsp" -WebApplication http://10.200.8.11:8299  -GACDeployment
6) iisreset
7) Enable-SPFeature -Identity "Arvato.BBA.AutoSendMailJob_Feature2" -Url "http://10.200.8.11:8299/sites/bba" 8
8) net stop SPTimerV4
9) net start SPTimerV4

 

3、删除多余定时器方法

//查看 计时器 "ArvatoBBASendMailTimerJob"
Get-SPTimerJob | ?{$_.Name -match "ArvatoBBASendMailTimerJob"} |ft id,name 
//Set job to a variable
 $job = Get-SPTimerJob -id 59af3540-7ac0-4477-82f9-1f6ab9829aca 
//And delete it.
 $job.Delete()

 

参考: http://www.cnblogs.com/wsdj-ITtech/archive/2011/05/10/2041843.html

 

 

 

 

 

 

你可能感兴趣的:(SharePoint)