NMSPCMD: the forgotten interface 

Almost every Notes Migrator for SharePoint blog post I have done over the last year has either featured the Designer Client or the newer Migration Console.  It is easy to forget, however, that our tool also has a command line interface.  This can be very useful for scripting jobs from other programs or from scheduling tools such as Windows Scheduler or even Domino agents.

NMSPCMD.EXE is installed in our bin directory (typically C:\Program Files\Quest Software\Notes Migrator For SharePoint 5.1\bin). The basic syntax is:

NMSPCMD.exe -job <jobfile> <options>  [ –source <connectionstring> ]  [ –target <listOrLibraryUrl> ]  [ –import <infile> ]  [ –export <outfile> ]  [ –log <logfile> ]  [ -defaultuser <username> ]

The parts in [ square brackets ] are optional overrides to the job options or global defaults.  These overrides allow you to run the same job multiple times specifying different sources and targets each time.

The source can be any connection string that you see on the Notes, QuickPlace, QuickR or Domino.Doc tabs.  The target should be the full path to the list or library.

 

Here are some examples...

Run a job:

NMSPCMD.exe -job "C:\temp\MigrateContacts.pmjob"

Override the source and target this time:

NMSPCMD.exe -job "C:\temp\MigrateContacts.pmjob" -source "database=names.nsf; server=eagle/Proposion" -target http://host:8080/dev/Contacts

Export to an intermediate XML file:

NMSPCMD.exe -job "C:\temp\MigrateContacts.pmjob" -export "C:\temp\ContactData.xml"

Import from an intermediate XML file and, whenever the automatic user mapping fails, substitute a specific user.

NMSPCMD.exe -job "C:\temp\MigrateContacts.pmjob" -import "C:\temp\ContactData.xml" –du “ACME\JoeUser”

 

Some of our customers actually run the same jobs on a nightly basis and use our powerful re-migration options to pull over just the new and modified documents.  They can optionally track changes using SharePoint versioning.

We had one customer write a service that  monitored a shared folder for new job files and intermediate data files.  An outsource team was creating and validating migration jobs and then uploading the results to the shared folder via FTP.  Then the service would kick in and import the results.

Finally, keep in mind that our job files and log files are really just XML files so it is not difficult to imagine a simple .NET utility that generates (or modifies) job files, runs the job, and inspects the results.  Or a utility that exports the data to an intermediate XML file, streams though the XML data file and does any needed cleanup, and then imports the results into SharePoint.

These capabilities have actually been part of the product since the beginning.  I just forget to mention them!

 

Note: As an alternative to the -list option above, we also still have an older option to override the target site collection, sub-site, and list name separately:

[ –targetsite <siteCollectionUrl> ]  [ –targetweb <subsitePath> ]  [ –targetlist <listOrLibraryName> ]

UPDATE:  Version 5.3 expands this list to include -formula and -view options to command line utility (NMSPCMD.exe).

 
Posted on 14-Jan-09 by Steve Walch
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
Tags: Automation, Notes Migrator for SharePoint, Tech Notes
 

Links to this post

Comments

Name:
URL:
Email:
Comments: