Ayoub Umoru

Published: June 2013

Send feedback or suggestions about this document to Ayoub@Umoru.de or write a reply https://contentdeployment.codeplex.com/discussions/446772.

 

 

Contents

 

 

Guide for SharePoint PowerShell Content Deployment

This guide was written based on version 0.2 of the PowerShell Content Deployment Release (https://contentdeployment.codeplex.com/)

Guide History

Release Date

Changes

June 17, 2013

Original release of this guide

 

 

Supported Configurations

This SharePoint PowerShell Content Deployment solution needs a local SharePoint 2010 Installation.

SharePoint 2010 – SharePoint 2010

Support

SharePoint 2013 – SharePoint 2013

Support

SharePoint 2010 – SharePoint 2013

Support

Different Patch Levels between 2 Farms

Support

Different Feature Sets between 2 Farms

Support

Disconnected Farms (Manual Data Transfer)

Support

 

 

Prerequisites

The SharePoint PowerShell Content Deployment has the following prerequisites:

  • Installed Version of SharePoint 2010
  • Enabled Windows PowerShell (Unsigned Scripts allowed)
 

 

Mandatory Configuration

Mandatory configuration steps are required and described here in the document. 
(Configure Content Deployment between two distinct Farms)

 

 

Files in the Solution

The SharePoint PowerShell Content Deployment Solution includes the following files:

  • Console.bat
  • Module.psm1
  • Settings/Local/Settings.xml
  • PSModules/Configuration.ps1
  • PSModules/ContentDeployment.Import.ps1
  • PSModules/ContentDeployment.Export.ps1

 

 

SharePoint PowerShell Content Deployment Purpose

The SharePoint PowerShell Content Deployment Solutions transfers content between 2 distinct SharePoint Farms.

For details on the discoveries, rules, monitors, views, and reports contained in this monitoring pack, seeAppendix: PowerShell Cmdlets.

 

 

Configure Content Deployment between two distinct Farms

This scenario describes the Steps involved for implementing Content Deployment between two Farms

  1. Create a destination location/Shared directory witch is r/w accessible from both Farms
  2. Download the latest Version from https://contentdeployment.codeplex.com/
  3. Locate the Settings.xml and edit the paths and directories.  

    <Root>

    <ContentDeployment>

    <Export
    FileLocation=\\SharedStorage\ContentDeploymentStorage\Data 
    TokenFileLocation=\\SharedStorage\ContentDeploymentStorage\Tokens\Token.token>
     

  4. Create the Job entry in Settings.xml describing on what you want to Export.
    Use the section JobItems to Name every List that you want to transfer. 


    <Root><ContentDeployment><Export><Jobs>

    <Job

    Name="XXX <- Your custom Job Name"

    SiteUrl="[SOURCEURL]"

    WebUrl="[SOURCEURL]"

    RetainObjectIdentity="0"

    Type="List"

    FileCompression="0"

    ExcludeDependencies="1"

    ImportUserInfoDateTimeOption="ImportAll"

    DestinationSiteUrl="[DEST URL]"

    DestinationWebUrl="[DEST URL]">

    <JobItems>

    <JobItem Name="Calendar" Type="List" />

    <JobItem Name="Shared Documents" Type="List" />

    </JobItems>

    </Job> 

  5. Finish Editing the Settings.xml
  6. Copy the Solution local to any Server on Farm A. (Correct paths to the Token Store and Data Store if necessary)
  7. Copy the Solution local to any Server on Farm B. (Correct paths to the Token Store and Data Store if necessary)

 

You now have completed the configuration.

 

 

Execute Content Deployment between two distinct Farms.

This scenario describes the Steps involved for executing Content Deployment between two Farms.

Exporting Content from Farm A

This scenario describes the Steps involved for Exporting Content from Farm A using the SharePoint PowerShell Content Deployment solution.

  1. Run Console.bat
  2. Type in and execute: 

    Run-ContentDeploymentJob –Identity XXX<- Your configured Job Identification –Mode Full

    After an successful Full Export and an following import, you then can switch to Export Content incremental by type in and execute the following command:

    Run-ContentDeploymentJob –Identity XXX<- Your configured Job Identification –Mode Incremental

    Importing Content from Farm A

    This scenario describes the Steps involved for Importing Content from Farm A using the SharePoint PowerShell Content Deployment solution.

  3. Run Console.bat
  4. Type in and execute:

    Run-ContentDeploymentJobForImport –Identity XXX<- Your configured Job Identification

 

 

 

HowSharePoint Content Deployment works

The following diagram shows how the SharePoint PowerShell Content Deployment works.

 

Content Deployment

 

 

Links

The following links connect you to information about common tasks that are associated with Content Deployment in General: 

A useful resource is the TechNet Library provided by Microsoft.

Always keep an eye open for the latest releases.

 

Important!

All information and content on non-Microsoft sites is provided by the owner or the users of the website. I make no warranties, express, implied, or statutory, as to the information at this website. 


Appendix:PowerShell Cmdlets

The SharePoint PowerShell Content Deployment Solution contains a hand full Cmdlets for Test and Troubleshooting Purpose and also for executing the Main tasks. Export and Import (Bolt).

 

Token

Cmdlet

Parameter

Description

Get-TokenFile

-

Reads the token file and returns the token objects

Get-Token

-Identify XXX

Return the latest Token object for Job XXX, if marked as already imported or not

Get-TokenForJob

-Job XXX

Returns the latest unused Token object for Job

 

Import

Cmdlet

Parameter

Description

Run-ContentDeploymentJobForImport

-Identity XXX

Imports the content into SharePoint for Job XXX

 

Export

Cmdlet

Parameter

Description

Run-ContentDeploymentJob

-Identity XXX –Mode [Full/Incremental]

General: Reads the configuration

-Mode Full: Exports the content from SharePoint for Job XXX, creates a new entry in the Token-File and stores the package in the Target Location.

-Mode Incremental: Checks if the last Import was successful to prevent data not being imported correctly (Accidently skipping an incremental import)

Exports the changed content from SharePoint for Job XXX, creates a new entry in the Token-File and stores them in the Target Location.

Get-ContentDeploymentJob

-Identity XXX

Gets the object of the Content Deployment Configuration for Job XXX

Get-ContentDeploymentJobChanges

-Identity XXX (Optional)–Object NameOfTheList

Returns objects for Job XXX that has been changed since the last Export operation.

Get-ContentDeploymentJobChangesDistinct

-Identity XXX

Returns distinct objects for Job XXX that has been Updated or Added since the last Export operation.

Last edited Apr 12, 2015 at 8:07 PM by AyoubUmoru, version 2

Comments

No comments yet.