转载请注明出自天外归云的博客园: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的更多相关文章

  1. SharePoint自动化系列——Site/Web/List级别的导航菜单

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 需求:在不同的测试用例中,对脚本中不确定的因素需要和用户交互来确定,比如选择哪个site,选择哪个 ...

  2. SharePoint自动化系列——通过PowerShell创建SharePoint Site Collection

    通过PowerShell创建SharePoint Site Collection,代码如下: Add-PSSnapin microsoft.sharepoint.powershell function ...

  3. SharePoint自动化系列——Solution auto-redeploy using Selenium(C#)

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 本来的想法是做一个可以自动卸载并且部署新solution到SharePoint farm的tool ...

  4. SharePoint自动化系列——通过Coded UI录制脚本自动化创建SharePoint Designer Reusable Workflow

    Coded UI非常好,我开始还在想,怎么样能让一个通过SharePoint Designer创建的Workflow publish三百五十次?想不到一个好的方法,也不知道SharePoint Des ...

  5. SharePoint自动化系列——Content Type相关timer jobs一键执行

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 背景: 在SharePoint Central Administration->Monito ...

  6. SharePoint自动化系列——创建MMS terms

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ PowerShell脚本实现MMS group.termSet.terms的自动化创建: Add- ...

  7. SharePoint自动化系列——Upload files to SharePoint library using PowerShell.

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 日常的SharePoint站点测试中,我们经常要做各种各样的数据,今天又写了几个脚本,发现自己写的 ...

  8. SharePoint自动化系列——Add content type to list.

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 将创建好的content type(若是跨web application需要事先publish c ...

  9. SharePoint自动化系列——Add/Remove "Record" from items

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 目的:批量的将SharePoint items变成records或者将records变成普通的it ...

随机推荐

  1. jQuery仿天猫完美加入购物车

    转载自:http://www.iteye.com/topic/1138064 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transiti ...

  2. BroadcastReceiver之实现锁屏、解锁样例

    好久没有写android的小样例了,因为前几天写了一篇关于Intent.Action的文章(http://blog.csdn.net/ljphhj/article/details/38796739). ...

  3. 在asp.net中执行存储过程(转)

    摘自:http://www.cnblogs.com/smhy8187/articles/677742.html 声明:本例用的数据库是系统提供的pubs数据库,表是是employee,编程语言用C# ...

  4. 马老师 LNMP生产环境Web架构 笔记

    http协议和缓存原理.多路IO模型: MIME机制,Multipurpose Internet Mail Extensions,多用户互联网邮件扩展.MIME使用一个简单的字符串组成,最初是为了标识 ...

  5. vsftp添加用户及测试

    上一篇我们讲了vsftp安装以及配置,这篇我们讲下如何添加用户,然后我们测试一下,看看是否成功. 首先说下添加用户,如图执行命令即可: 这里简单解释一下:第一条命令是添加用户,第二条命令是设置用户密码 ...

  6. 4.Java基础:Java对象的内存管理机制

    1.使用new创建对象,在堆内存分配对象空间.初始化: 2.在方法栈中定义局部变量,吃用对堆内存中对象的引用: 3.方法执行完返回,栈内存自动释放,局部变量销毁: 4.如果堆内存中对象没有变量引用它, ...

  7. python学习笔记011——内置函数sum()

    1 描述 sum() 方法对系列进行求和计算. 2 语法 sum(iterable[, start]) iterable:可迭代对象,如列表. start:指定相加的参数,如果没有设置这个值,默认为0 ...

  8. hello oc

    printf("Hello C\n"); //OC可以采用C语言的输出方式 printf("The number is %d\n",100);//%d 输出数字 ...

  9. VS报:"dll标记为系统必备组件,必须对其进行强签名"错误

    问题: VS生成程序时,报“要将程序集“XX.dll”标记为系统必备组件,必须对其进行强签名.”错误. 解决方法: 1)在报错的解决方案中找到一个可以发布的项目(引用该XX.dll的项目未必可以发布) ...

  10. Report_Report Builder的一些基本概念(概念)

    2014-05-31 Created By BaoXinjian