转载请注明出自天外归云的博客园: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的,其他类型的都不可以!!!

最新文章

  1. 批量设置select为默认项
  2. 在ASP.NET MVC5应用程序中快速接入QQ和新浪微博OAuth
  3. Inside Kolla - 05 从 tools 目录开始
  4. 关于viewport的研究
  5. Android实现入门界面布局
  6. 【hdu2815-Mod Tree】高次同余方程-拓展BadyStepGaintStep
  7. BeanDefinition的载入和解析
  8. 《JSON必知必会》
  9. vim ctags 的使用
  10. C语言的本质(7)——C语言运算符大全
  11. svn: keywords
  12. ASP.NET DataTable的操作大全
  13. python编程快速上手之第9章实践项目参考答案
  14. Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
  15. 洛谷P2866 [USACO06NOV]糟糕的一天Bad Hair Day(单调栈)
  16. python 进阶读书笔记2 -- python魔法函数
  17. HDU 1823 Luck and Love (二维线段树&区间最值)题解
  18. Leetcode题库——35.搜索插入位置
  19. Python中的迭代和可迭代对象
  20. SpringDaoSupport

热门文章

  1. onkeydown-onkeypress-onkeyup
  2. 解决windows下MySQL表名大写自动变小写的问题
  3. HDUOJ---汉洛塔IX
  4. hduoj------确定比赛名次
  5. 【LeetCode】80. Remove Duplicates from Sorted Array II (2 solutions)
  6. eclipse安装插件的方式 三种:links、eclipse中使用插件安装向导安装、直接copy插件到对应的eclipse目录 MyEclipse10安装SVN插件
  7. HawkHost退款流程详解
  8. Android快速开发不可或缺的11个工具类(下载)
  9. 转 HTTP协议 (四) 缓存
  10. Singleton - 单例模式和Double-Checked Locking - 双重检查锁定模式