码迷,mamicode.com
首页 > 系统相关 > 详细

powershell 操作sharepoint命令集

时间:2014-10-30 18:47:56      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:http   io   os   ar   for   sp   strong   on   2014   

打开SharePoint 2013 Management Shell, and then run as administrator.执行如下命令

1. 添加wsp和安装
Add-SPSolution -LiteralPath "C:\DeployResource\WSP\test.wsp"
Install-SPSolution -Identity "test.wsp" -WebApplication "http://domain:port/" -GACDeployment -Force

如果是无资源安装则去掉-WebApplication "http://domain:port/"

2. 更新wsp:Update-SPSolution -Identity SPListUpdateAD.wsp -LiteralPath "D:\BackupOfBackup\Release_20141010\WSP\SPListUpdateAD.wsp" -GACDeployment

3. 备份wsp:Get-SPSolution | Where {$_.Name -eq "SPListUpdateAD.wsp" } | ForEach-Object{ $_.SolutionFile.SaveAs("d:\Backwsp\"+$_.Name)}

4. 移除wsp,需要先在CA>System Settings>farm solution>retract 该wsp,在执行下面powershell script
Remove-SPSolution -Identity "hkexsitewakeuptimerjob.wsp" -Confirm:$false

5. 移除timer job

$job = Get-SPTimerJob -id 3219759c-c748-444c-9ed7-bb3afb17fc9f
$job.Delete()

6. 查询timer job
Get-SPTimerJob | where { $_.name -like “*HKEx*” } |ft id,name

7. 激活feature
Enable-SPFeature -Identity "SharePointWebPartProject_SharePointWebPartFeature" -Url http://www.contoso.com
8. 禁用feature
disable-SPFeature -id 1563deb1-0c37-481c-9463-f3581e720897 -Url http://www.contoso.com  -Url http://www.contoso.com

 

powershell 操作sharepoint命令集

标签:http   io   os   ar   for   sp   strong   on   2014   

原文地址:http://www.cnblogs.com/leixb/p/4063147.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!