SharePoint自动化系列——Error features自动deactivate
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/
SharePoint Content Deployment prerequisite——Error features deactivate automation
对于Content Deployment的过程简而言之就是:
General Application Settings -> Content Deployment ->
1) Configure content deployment :
Accept Content Deployment Jobs ->Accept incoming content deployment jobs
Connection Security ->Do not require encryption
Source Status Check ->Disable Source Status Check
->OK
2) Check deployment of specific content :
Type in the source url and check the definition.
3) Manage Content Deployment Paths and Jobs:
New Path(Create the path from source to definition)
Notice: The source web application's content database should distinguish the content database of the destinition web application.
New Job(Create the job under the path to achieve the deployment of the content)
但是在跑job之前,我们要确保做好了prerequisite,如下:
1) 在Site collection feature中激活Content Deployment Source Feature以及Cross-Site Collection Publishing feature。
2) 检查Content Deployment Source Status,把所有Error features全都deactivate掉。
对于Error features的deactivate过程,我们通过PowerShell来完成,这里我将Disable-SPFeature命令进行了简单的封装,方便我们的使用,代码如下:
Add-PSSnapin Microsoft.SharePoint.PowerShell
function DeactivateSPFeature($featureName, $siteUrl)
{
Disable-SPFeature –Identity $featureName –URL $siteUrl
}
function autoDeactivateSPFeature(){
$flag = $true
$siteUrl = Read-Host "Enter the site url"
While($flag)
{
$featureName = Read-Host "Enter the feature name"
DeactivateSPFeature $featureName $siteUrl
$choice = Read-Host "Press 'c' to continue, any other key to quit"
if($choice -ne 'c')
{
$flag = $false
}
}
}
autoDeactivateSPFeature
保存到本地ps1文件,执行时run with PowerShell即可,在IDE中执行效果如下:

所有的Error features都deactivate之后,页面上会提示:
“There are no errors and this Site Collection is ready for Content Deployment.”
3) 还有最最重要的一点,目的段的site template一定要注意必须是blank的,其他类型的都不可以!!!
SharePoint自动化系列——Error features自动deactivate的更多相关文章
- SharePoint自动化系列——Site/Web/List级别的导航菜单
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 需求:在不同的测试用例中,对脚本中不确定的因素需要和用户交互来确定,比如选择哪个site,选择哪个 ...
- SharePoint自动化系列——通过PowerShell创建SharePoint Site Collection
通过PowerShell创建SharePoint Site Collection,代码如下: Add-PSSnapin microsoft.sharepoint.powershell function ...
- SharePoint自动化系列——Solution auto-redeploy using Selenium(C#)
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 本来的想法是做一个可以自动卸载并且部署新solution到SharePoint farm的tool ...
- SharePoint自动化系列——通过Coded UI录制脚本自动化创建SharePoint Designer Reusable Workflow
Coded UI非常好,我开始还在想,怎么样能让一个通过SharePoint Designer创建的Workflow publish三百五十次?想不到一个好的方法,也不知道SharePoint Des ...
- SharePoint自动化系列——Content Type相关timer jobs一键执行
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 背景: 在SharePoint Central Administration->Monito ...
- SharePoint自动化系列——创建MMS terms
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ PowerShell脚本实现MMS group.termSet.terms的自动化创建: Add- ...
- SharePoint自动化系列——Upload files to SharePoint library using PowerShell.
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 日常的SharePoint站点测试中,我们经常要做各种各样的数据,今天又写了几个脚本,发现自己写的 ...
- SharePoint自动化系列——Add content type to list.
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 将创建好的content type(若是跨web application需要事先publish c ...
- SharePoint自动化系列——Add/Remove "Record" from items
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 目的:批量的将SharePoint items变成records或者将records变成普通的it ...
随机推荐
- plsql 表数据中文显示乱码(配置环境变量)
plsql 表数据中文显示乱码(配置环境变量) CreateTime--2018年4月23日19:32:37 Author:Marydon 1.情景再现 2.解决方案 配置环境变量 变量名:NLS ...
- 自己写的一个读取execl的帮助类
目标:读取execl的第一个sheet,并传入不需要读取的表头的行数,返回该execl里所有数据的list 解析共有2种:1.DOM 2.SAX import java.io.File; i ...
- apachebench的简单使用
apachebench的简单使用 2013-03-08 15:48:47 分类: LINUX ApacheBench是 Apache 附带的一个小工具,专门用于 HTTP Server 的benchm ...
- HDUOJ----(1016)Prime Ring Problem
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Other ...
- CTF入门
一.抓包工具 Fiddler:轻量级,简洁,原理是使用代理 有一个大坑,如果打开抓包工具,运行Python Requests发起网络请求,Python程序会运行得非常慢,所以必须把抓包工具关掉才可以快 ...
- TortoiseSVN 覆盖SVN仓库最新版本提交
情况背景: ibank.pdm文件最新版本有问题,版本号为5051. 我想在5050的版本上修改后提交,覆盖5051版本的修改,也就是经过我修改后的5050版本,覆盖5051版本的修改,提交成功并成为 ...
- WinDBG 常用命令表[转]
启动, 附加进程, 执行和退出(Starting, Attaching, Executing and Exiting) ======================= Start -> Al ...
- -no-xrender will disable the qtwebkit
-no-xrender will disable the qtwebkit apt-get install libxrender-dev 来自为知笔记(Wiz)
- Concurrency Managed Workqueue(四)workqueue如何处理work
一.前言 本文主要讲述下面两部分的内容: 1.将work挂入workqueue的处理过程 2.如何处理挂入workqueue的work 二.用户将一个work挂入workqueue 1.queue_w ...
- 《TCP/IP具体解释卷2:实现》笔记--选路请求和选路消息
内核的各种协议并不直接使用前面提供的函数来訪问选路树,而是调用几个函数:rtalloc和rtallocl是完毕路由表查询的两个 函数:rtrequest函数用于加入和删除路由表项:另外大多数接口在接口 ...