Using the Command-Line Interface

Overview

Migration Manager provides a rich set of command-line parameters that make it possible to fully automate both migrations and ongoing use of Migration Manager. Scenarios where this is useful include:

  • Migrating users as part of machine deployment; it’s possible to extract the user state from the user’s current system before starting the OS deployment of the new system and then finish up by injecting the user state as the last step of the OS deployment
  • Provide ongoing recovery services by doing an initial extraction and then regular backups of a user’s system. If something goes wrong with the system, it can be reimaged/reinstalled and the backed up user state restored

Automating the use of Migration Manager helps ensure an efficient and repeatable process that allows IT administrators to be more productive.

In a typical networked company environment, it’s most efficient to deploy Migration Manager on a shared server that hosts the application files and typically also the user state data extracted from the user systems (although this information can also be stored elsewhere). This approach is useful as Migration Manager then doesn’t have to be installed on each individual system where it will be used; the application can be run directly from the server.

Configuration settings and the information needed by Migration Manager is also stored centrally on this shared server.

In a highly distributed environment, it’s of course possible to have multiple shared installations of Migration Manager (e.g. one per branch office). Your network configuration will help determine what the best approach is for your environment.

In most cases, one or more scripts are created for each operation so that you don’t have to remember all of the command-line parameters every time you perform an operation with Migration Manager. These scripts can be simple batch files, PowerShell scripts or anything else that can run an application and pass command-line parameters to the application.

These scripts are also useful for integration into OS deployment solutions or desktop management tools from other software publishers.

Automating Personality Migrations

Using command-line parameters, Migration Manager can be set up to automatically extract, inject and backup the user state for the currently logged in user, a user that is not logged in to the computer, or multiple users.

The personality is extracted or backed up on the source PC and automatically injected on the target PC. The next section details all supported command-line switches followed by batch file examples that will assist you in the development of an automated migration process.

Note
To extract, inject or backup a personality for a user or users that are not currently logged in to the machine, the user that is performing the extraction or injection must have Local Administrator Rights. Migration Manager also requires UAC elevation on Windows if enabled.

Using Unicode Characters in Batch Files

Migration Manager is typically automated using batch files. If there is a need to use Unicode characters in your batch files, there are a few steps to follow in order for Windows to correctly process the batch files: The batch file must be saved using the Unicode UTF-8 encoding without a Byte Order Marker (BOM) The batch file must contain the code page directive to enable Unicode (chcp 65001)

Example Batch File

  1. @echo off
  2. chcp 65001
  3. echo Extracting data...
  4. start /w \\MyServer\MigrationManager\MigrationManager.EXE /autoextract /allusers /DATASTORE \\MyServer\MigrationManager\짙겻쪉갥앐숱꼽
  5. IF ERRORLEVEL 1 (echo Extraction failed) ELSE (echo Extraction succeeded)