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/lindaWei/archive/2012/12/06/2805197.html
SharePoint 网站集备份还原
Ø Backup-SPSite
https://technet.microsoft.com/EN-US/library/ff607901.aspx
Ø Restore-SPSite
https://technet.microsoft.com/EN-US/library/ff607788.aspx
SharePoint 服务器场解决方案
Ø Add-SPSolution
https://technet.microsoft.com/EN-US/library/ff607552.aspx
Ø Install-SPSolution
https://technet.microsoft.com/EN-US/library/ff607534.aspx
Ø Update-SPSolution
https://technet.microsoft.com/EN-US/library/ff607724.aspx
Ø Uninstall-SPSolution
https://technet.microsoft.com/EN-US/library/ff607873.aspx
Ø Remove-SPSolution
https://technet.microsoft.com/EN-US/library/ff607748.aspx
SharePoint 站点导入导出
Ø Import-SPWeb
https://technet.microsoft.com/EN-US/library/ff607613.aspx
Ø Export-SPWeb
https://technet.microsoft.com/EN-US/library/ff607895.aspx
Ø Manage sites in SharePoint 2013
https://technet.microsoft.com/en-us/library/ee890106.aspx
Ø Manage timer jobs in SharePoint 2013
https://technet.microsoft.com/en-us/library/ee906546.aspx
在SharePoint 2010中,我们可以使用Visual Studio 2010轻松创建WSP包来安装Web Part, Event Handler, Application Page以及其他。非常方便,但是你有没有研究过在在整个过程中SharePoint究竟做了些什么?以下是我根据http://msdn.microsoft.com/library/aa544500(office.14).aspx这边官方文章翻译,以及做实验的结果。我是用的是PowerShell命令进行部署。
在部署项目之前,看一下我的项目结构(这个项目主要是使用Feature的方式来部署Web part):
使用VS2010打包的结果是生成一个WSP文件“SharePointWebPartProject.wsp”.
第一步:向SharePoint添加解决方案包:
Add-SPSolution -LiteralPath "C:DeploySharePointWebPartProject.wsp"
部署的结果是WSP包被部署到SharePoint的配置数据库中.(默认是SharePoint_Config)
SQL 命令:
select * from dbo.Objects where name='SharePointWebPartProject.wsp'
如果你的输入没有错误的话,你可以查询到2条相关的记录。
但是这个时候,数据还是仅仅存在于配置数据库中,我们还需要安装解决方案包。
第二步:安装解决方案包:
Install-SPSolution -Identity "SharePointWebPartProject.wsp" -WebApplication http://www.contoso.com -GACDeployment
那么这一步的结果是什么呢?那就是先解压WSP包,然后拷贝程序集,Ascx等文件到相应的目录下面。当然咱们部署的是Feature,你就可以在“C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEFEATURES” 文件夹下面找到Feature的相关文件。在“C:Windowsassembly”中也可以找到程序的dll.
如果你是多个Web前端怎么办?是不是还需要挨个部署?当然不需要了,Timer job会帮助你搞定这一切!
第三步:激活Feature:
Enable-SPFeature -Identity "SharePointWebPartProject_SharePointWebPartFeature" -Url http://www.contoso.com
这里值得注意的是 Feature的名字可能和你想象的不一样。是“ProjectName_FeatureName”自动去掉中间的空格。当你使用命令行部署的时候,如果出现错误,不妨去“C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEFEATURES” 看一下这个feature叫什么名字。
那么接下来你就可以向页面添加Web Part了!
补充:以下是删除解决方案的一些Powershell 命令,仅供参考:
Disable-SPFeature -Identity "SharePointWebPartProject_SharePointWebPartFeature" -Url http://www.contoso.com -Confirm:$false Uninstall-SPSolution -Identity "SharePointWebPartProject.wsp" -WebApplication "http://www.contoso.com" -Confirm:$false Remove-SPSolution -Identity "SharePointWebPartProject.wsp" -Confirm:$false
参考:
http://technet.microsoft.com/en-us/library/cc262995.aspx
http://msdn.microsoft.com/library/aa544500(office.14).aspx