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 ...
随机推荐
- UrlConnection的代理和返回状态码的问题
今天写了一段代码想在service里访问一个外部网站,在service的方法里写了如下代码 System.setProperty("http.proxyType", "4 ...
- get请求乱码情况
编写一个RegistServlet处理用户的Get请求数据 public void doGet(HttpServletRequest request, HttpServletResponse resp ...
- SpringBoot使用拦截器
SpringBoot的拦截器只能拦截流经DispatcherServlet的请求,对于自定义的Servlet无法进行拦截. SpringMVC中的拦截器有两种:HandlerInterceptor和W ...
- 【LeetCode】88. Merge Sorted Array (2 solutions)
Merge Sorted Array Given two sorted integer arrays A and B, merge B into A as one sorted array. Note ...
- POJ 3295 Tautology (构造法)
Tautology Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7716 Accepted: 2935 Descrip ...
- Python基本数据类型详细介绍(转)
1.空(None)表示该值是一个空对象,空值是Python里一个特殊的值,用None表示.None不能理解为0,因为0是有意义的,而None是一个特殊的空值.2.布尔类型(Boolean)在 Pyth ...
- 百度定位SDK实现获取当前经纬度及位置
使用Android自带的LocationManager和Location获取位置的时候,经常会有获取的location为null的情况,并且操作起来也不是很方便,在这个Demo里我使用了百度地图API ...
- 【js】批量判断表单中的文本框非空
方法一: <script type=”text/javascript”> /* * 批量验证表单非空 * 需要非空验证控件的样式class=”mustadd” */ $(".mu ...
- python学习笔记——多进程中共享内存Value & Array
1 共享内存 基本特点: (1)共享内存是一种最为高效的进程间通信方式,进程可以直接读写内存,而不需要任何数据的拷贝. (2)为了在多个进程间交换信息,内核专门留出了一块内存区,可以由需要访问的进程将 ...
- OAF_OAF控件系列3 - AdvancedTable的实现(案例)
2014-06-02 Created By BaoXinjian