Note however that I didn't re-invent the wheel here - these classes are all almost straight copies of what Microsoft uses internally in the assembly itself (if you use Reflector to look at you'll see these classes defined there - I didn't want to deal with lots of reflection to use these so I just recreated them thereby allowing me to make modifications to suite my own needs where necessary).The code to work with the content deployment API is pretty straightforward. gl-exportlist This command has almost exactly the same parameters as the built in "export" command.Stefan Go├čner does a really good job at explaining how to use the API in his blog Deep Dive into Share Point Content Deployment and Migration API so I won't reiterate it here. The only thing of note is that the default value for the versions flag is 4 (or All versions for files and list items) in mine whereas the default for the export operation is 1 (or Last major version for files and list items).

In order to accomplish this I had to create the ability to import and export lists (turns out this alone won't solve my problems but the commands I've created could be extremely handy in many scenarios).

Stsadm has the ability out of the box to export and import web sites but it doesn't support doing just lists.

However, the content deployment API does allow you to import and export any object type (right down to an individual list item).

After my upgrade the site directory is a bit messed up (the upgrade seemed to have merged columns).

One of the challenges I'm currently trying to solve is related to the site directory.

This blog is no longer in use--you can find all posts and comments at my new blog; I will no longer be posting to this site and comments have been disabled.In an attempt to get the site directory in a state that I can work with I'm looking at several possibilities.So the solution was rather simple - I just created two new commands which function almost identically to the existing import and export commands except that they work with lists (export takes in an URL representing a view of the list and import takes in a target web to import the list in to).I also created a copy command which wraps up the import and export so that both can be done in one step (passing "-deletesource" to the copylist command will make it function like a move command).While working on all this I also decided that I got tired of writing the same parameter validation code over and over again so I created a new base class (SPOperation) and some parameter classes (SPParam and SPParam Collection).These classes use several validator classes that help with more complex validations.