Sunday 26 May 2013

Migrate Knowledge Base Articles from Service Manager 2010 to 2012

To help ease the migration between Service Manager 2010 and 2012 (or even just one management group to another!) I've created a script that will export all of the Knowledge Articles, including the Rich Text used for the Analyst and End User content.

You can find the script here on the TechNet Gallery:
http://gallery.technet.microsoft.com/Migrate-Knowledge-Base-15b81ab6

Download and extract the zip file and put the SCSMExportKB.ps1 file in a directory you have access to.

The script also relies on the SMLets from CodePlex found here which also makes this independent of which version of Service Manager you're running.

After you've installed the SMLets, launch a PowerShell session (Elevated as Admin) and ensure that the execution of scripts is allowed by typing:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Next navigate to the folder with the script and run it with the paramerter of where to export the KB Articles to.  If you do not specify a path it will default to exporting the KB Articles to the users temp folder.

For example I would run this to export to my downloads folder:

.\SCSMExportKB.ps1 C:\Users\SBAdmin\Downloads

The script will then start running and you will see the progress of it exporting to RTF files any Analyst or End User content and then the rest of the KB Article details.

 

Copy these exported files to the same location on the target server (or modify the csv to point to a new location) and then use the KBImport.xml provided in the zip file along with the Knowledge.csv created by the PowerShell script to import them into the target Service Manager system using the CSV Import Wizard.

N.B. Before you do the import, be sure to remove the first line of the CSV which has the headers in it!



 
And that should be that, one set of exported and imported Knowledge Articles.
 
There is one limitation however...
In this current version only the Out-Of-Box lists are supported.  I'm working on the script to handle custom list values and will update the solution when it's automated.  Until then you will need to find the enumeration ID's from your target site and replace the source ID's in the CSV file with the corresponding ones.
 
I'd also like to thank Anton Gritsenko (aka FreemanRU) for pointing me in the right direction for this script.

3 comments:

tEST said...

Thanks for sharing!!

deleteme said...

Thank you for the informative post. You mentioned that you were working on a version of Knowledge Article Export script that would handle customizations for article category, tag, and type. Did you continue with this work? We're faced with a 2010-2012 migration, but have limited experience doing the CSV changes to search-and-replace the custom GUIDs.

Steve Beaumont said...

That would be a no Robert, mainly because I entered a whirlwind of a time setting up a new company and secondly, because I just plain forgot.

I'll put it on my to-do list for the next couple of months and see what I can do.

SB