Content deployment in SharePoint 2013 is handled at the site collection level. New to SharePoint 2013, we must first activate the Content Deployment Source Feature. This new feature provides a report containing a list of features currently activated that are not supported by content deployment. In addition, this feature makes the site collection available in the list of site collections to use as the source when creating our content deployment connection in the Creating the content deployment path recipe.
For this recipe, we should have a source site collection and a target site collection created. They should both be created with the same site template, such as the Publishing Site template.
Follow these steps to configure the source site collection for content deployment:
$site = Get-SPSite http://sharepoint/sitecollection $site.Features | Where-Object { $_.Definition.DisplayName –eq "Ratings" } | ForEach-Object { $site.Features.Remove($_.DefinitionId) }
SharePoint 2013 uses the Content Deployment Source Feature to identify which site collections to make available when configuring a content deployment path. A content deployment path defines the source and the target for deploying content. In addition, this feature makes available the Content Deployment Source Status page that displays features from the source site collection known not to be compatible with content deployment.
The Content Deployment Source Status page will only list incompatible features that are included with SharePoint. If you have third-party or custom solutions, you should test them in a nonproduction environment to ensure they work with content deployment operations.
Activating a site collection feature may also be accomplished with PowerShell or code using the server-site object model. When doing so the feature identifier for the Content Deployment Source Feature is cd1a49b0-c067-4fdd-adfe-69e6f5022c1a
.
Follow these steps to activate the site collection feature using PowerShell:
Get-SPSite
Cmdlet as follows:$site = Get-SPSite http://sharepoint/sitecollection
$site.Features[[GUID]"cd1a49b0-c067-4fdd-adfe-69e6f5022c1a"]
$site.Features.Add([GUID]"cd1a49b0-c067-4fdd-adfe-69e6f5022c1a")
Follow these steps to activate the site collection feature with code using the server-side object model:
using
statement as follows:using (var site = new SPSite("http://sharepoint/sitecollection"))
if (site.Features[new Guid("cd1a49b0-c067-4fdd-adfe-69e6f5022c1a")] == null)
site.Features.Add(new Guid("cd1a49b0-c067-4fdd-adfe-69e6f5022c1a"));
18.118.137.7