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 ...
随机推荐
- spring mvc异常的处理
1.全局处理 <!-- 总错误处理 --> <bean id="exceptionResolver" class="org.springframewor ...
- 对TCP性能的考虑
#xiaodeng #对TCP性能的考虑 #HTTP权威指南 86 #对TCP性能的考虑 #HTTP紧挨着TCP,位于其上层.所以HTTP事务的性能很大程度上取决于底层tcp通道的性能. #4.2.1 ...
- java中list、set和map 的区别(转)
作者:佚名出处:IT专家网论坛 2009-06-17 13:00 List按对象进入的顺序保存对象,不做排序或编辑操作.Set对每个对象只接受一次,并使用自己内部的排序方法(通常,你只关心某个元素 ...
- 笔记本连接老式显示器(VGA线+HDMI接口)
参考:http://www.cnblogs.com/me115/p/3970945.html
- PHP实现4种排序算法
1.冒泡排序 冒泡排序其实是基于“交换”.每次从第一个记录开始,一.二两个记录比较,大的往后放,二三两个记录比较...依次类推,这就是一趟冒泡排序.每一趟冒泡排序后,无序序列中值最大的记录冒到序列末尾 ...
- MySQL5.7 二进制源码包安装
一般平时安装MySQL都是源码包安装的,但是由于它的编译需要很长的时间,所以建议安装二进制免编译包.可以到MySQL官方网站去下载,也可以到comsenz官方网站下载,还有各大镜像站下载. 下载安装包 ...
- macOS Sierra Git Gui Crash 解决方法
本篇文章由:http://xinpure.com/macos-sierra-git-gui-crash-solution/ 问题描述 自从升级到 macOS Sierra 10.12 之后,git g ...
- PAT 1087 All Roads Lead to Rome
PAT 1087 All Roads Lead to Rome 题目: Indeed there are many different tourist routes from our city to ...
- BasicAuth和OAuth
参考资料 百度百科BasicAuth 维基百科OAuth BasicAuth基本授权 BasicAuth又叫HttpAuth,它非常简单.例如你访问一个页面时,会弹出用户名密码框 它的优点是:简单,只 ...
- Sourcetree 更新git账号密码
删除Sourcetree 缓存文件(只需要删密码文件),文件位置: Mac: ~/Library/Application Support/SourceTree Windows: C:\Users\US ...