One of the least understood, yet most powerful tools, included with Windows SharePoint Services v3 and SharePoint Server 2007 is the stsadm.exe command line tool.
Why Use Stsadm.exe?
The stsadm.exe command line tool provides a quick and effective way for performing a majority of SharePoint administrative functions. Many administrators are familiar with using the Windows command line (DOS) environment. The stsadm.exe commands typically include administrative tasks that can be performed using the administrative user interface. However, when SharePoint administrative tasks cannot be accomplished through the administrative user interface, it is necessary to use the stsadm.exe command line tool to complete those tasks
Mindsharp now has a Whitepaper detailing most of the 184 command-line options for stsadm.exe. Visit http://mindsharp.com and go to the premium content area to download. Here's a teaser using the migration set:
Stsadm.exe –o import imports a .cmp file created with stsadm.exe –o export. When using stsadm.exe -o import, you can define the parameters listed below.
-url Specifies where to import the Content Migration Package (.cmp) file. For example, the .cmp file might be imported to http://webapp.trainsbydave.com/sites/HR.
-filename Specifies the name of the file from which to import.
-includeusersecurity Optional parameter that causes groups, timestamps, security information, and user information to be imported.
-haltonwarning Optional parameter that stops execution when a warning is encountered.
-haltonfatalerror Stops execution when a fatal error occurs.
-nologfile-Optional parameter that suppresses the creation of a log file.
-updateversions Parameter that specifies how versions will be merged on import. This parameter has the following three options:
· Option 1 adds new versions to those that already exist in the .cmp file. This is the default setting.
· Option 2 overwrites the file and all its versions, keeping only those already in the destination.
· Option 3 causes files that already exist in the destination to be ignored.
-quiet Optional parameter that suppresses output to the console except for a notification on completion.
Ben Curry
Mindsharp