Share via


Step-by-Step: Basic Windows Migration using USMT for IT Professionals

Applies To: Windows 7, Windows 8, Windows 8.1

The User State Migration Tool (USMT) 5.0 is designed to help IT professionals migrate files and settings to the Windows operating system. USMT is a Microsoft application intended for administrators who are performing large-scale automated deployments. For deployment to a small number of computers or for individually customized deployments, you can use Windows Easy Transfer.

This step-by-step guide to Windows migration for IT pros provides a basic example of how to migrate files and settings from Windows XP to Windows® 8 using USMT. (You can also migrate files and settings from a computer running Windows Vista® or Windows® 7.) At the end of this process, you will have used the ScanState and LoadState tools to complete an end-to-end migration. You can also customize your migration by editing configuration files used by these tools. For more information, see USMT XML Reference.

In this example, you gather data from a source computer running Windows XP, create a migration store using the default settings in ScanState, install Windows 8 on a new or newly repartitioned computer, and then apply data from the migration store.

In this Topic

  • Requirements

  • Step 1: Gather Data Using the ScanState Tool

  • Step 2: Install Windows

  • Step 3: Apply Data Using the LoadState Tool

Requirements

To complete this scenario, you need the following:

  • Windows 8 product DVD disc

  • Windows Assessment and Deployment Kit (Windows ADK)

    You can install the Windows ADK directly from the Internet. You can also use a computer that has Internet access to download the installer files so that you can run Setup on an offline computer. In the Windows ADK Setup Wizard, you can select the ADK features that you want to install, such as USMT.

  • A source computer

    A source computer requires a network adapter, a working network environment, and a DVD-ROM drive. This guide uses a source computer running Windows XP. However, you can also use a source computer running Windows Vista or Windows 7. If you choose to use this guide with Windows Vista or Windows 7, the interface will differ slightly from that of Windows XP, and you may have to modify some of the steps for actions on that operating system, but the USMT syntax will remain the same.

    Note

    If you do not use the optional destination computer, the source computer will be reformatted for the purposes of this scenario. Create a backup of the source computer before testing your migration with USMT.

  • A technician computer

    A technician computer can be any computer on which you will install the Windows ADK. This computer also requires a DVD-ROM drive. After you have installed the Windows ADK on the technician computer, you can copy the USMT to other computers in your organization.

  • Administrative privileges

    You must run USMT in Administrator mode from an account with full administrative permissions to ensure that all specified users are migrated. For more information on Administrator mode, see USMT Requirements.

  • Optional: a destination computer

    A destination computer is the computer onto which you intend to migrate files and settings. This computer requires a network adapter, a working network environment, and a DVD-ROM drive.

    For this example, you can reuse the source computer as your destination computer. After you create a migration store on a server, you can then reformat the hard drive of the source computer, returning it to a blank state. The source computer will then become your destination computer.

  • Optional: installation software for applications for which you will migrate files and settings

    Note

    The application version that is installed on the destination computer should be the same version as the one on the source computer. USMT does not support migrating the settings for an older version of an application to a newer version. The exception to this is Microsoft® Office applications, which USMT can often migrate from an older version to a newer version.

Step 1: Gather Data Using the ScanState Tool

There are two migration scenarios. Migrating to a new operating system on a single computer is known as PC refresh. Migrating to a separate destination computer is known as PC replacement. For more information about PC refresh and PC replacement, see Common Migration Scenarios.

In most PC-refresh scenarios, you can perform a hard-link migration. Use of a hard-link migration store drastically improves migration performance and significantly reduces hard-disk space usage. For more information about hard-link migrations, see Hard-Link Migration Store.

In some PC-refresh scenarios, however, such as repartitioning the drive, you cannot use a hard-link migration store. In this case, you must create a compressed or uncompressed migration store instead. This is called a PC-replacement scenario and is similar to the steps you use when migrating files and settings to a new computer. In this step-by-step guide, you will create a compressed migration store on a server that can be used in either a PC-refresh or PC-replacement scenario.

Install USMT

You can install USMT and other Windows ADK features directly from the Internet on any computer running a supported operating system such as Windows 7 or Windows 8. After the Windows ADK features are installed, you can copy USMT files and tools to other computers in your organization.

  1. On a computer running an operating system that is supported by Windows ADK, run ADK Setup.

  2. Select Install, specify the location where you want to install ADK features, and then click Next.

  3. In the Assessment and Deployment Kit window, select the ADK features that you want to install, including USMT and then click Install.

  4. Copy all of the contents of the \USMT folder under C:\Program Files (x86)\Windows Kits\8.0\ to a network share or USB drive. For example, at a command prompt, type:

    xcopy " C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\User State Migration Tool\x86" \\server\share\USMTx86
    
  5. Copy the USMT files and tools to the source computer. For example, on the source computer, at a command prompt, type:

    xcopy \\server\share\USMTx86 C:\USMT
    

    Note

    Only the ScanState tool is supported on Windows XP. Other USMT and Windows ADK Technical Reference tools, such as LoadState and Windows System Image Manager (Windows SIM), are not supported on Windows XP. To use the Windows ADK Technical Reference to create an answer file or a customized Windows image for deployment, you must install the Windows ADK Technical Reference on a computer running a supported operating system.

Optional: Create a Test Account to Migrate

If you are using a source computer that has not been customized by a user to include personal files and modifications such as desktop wallpaper, you should create a test account in order to test and verify a successful migration.

To create a local test account on a Windows XP computer that is not joined to a domain

  1. Click Start, click Control Panel, click User Accounts, and then click Create a new account.

  2. Type USMT Tester, and then click Create Account.

  3. Click Close.

To create a local test account on a Windows XP computer that is joined to a domain

  1. Click Start, click Control Panel, and then click User Accounts.

  2. In the User Account window, click the Advanced tab.

  3. Under Advanced User Management, click Advanced.

  4. In the Local Users and Groups pane, click Users.

  5. On the Action menu, click New User.

  6. Type USMT Tester in the User name: text box, type a password that you will remember, or make a note of it, click the User must change password at next logon check box to clear it, and then click Create.

  7. Click Close.

Optional: Add files and Settings to a Test Account

Make any other changes to the USMT Tester account that you would like to test during the migration. For example:

  • Copy files from a USB flash drive (UFD) or a network share to the My Documents folder for the test account. You can use .txt files or a sample of file types you would like to migrate. For more information, see What Does USMT Migrate?.

  • Copy or create test files on the C:\ drive.

  • Set a custom desktop wallpaper. Built-in wallpaper images, such as Tulips.jpg on Windows XP, will not migrate. Instead, save a new image file to the source computer to use as wallpaper.

  • Change the font color in the command-prompt application.

  • Map a network drive.

  • Set the home page in Internet Explorer®.

Optional: Preview What USMT Will Migrate

The MigXmlHelper.GenerateDocPatterns function can be used to automatically find user documents on a computer without authoring extensive custom migration .xml files. This function is included in the MigDocs.xml sample file downloaded with the Windows ADK Technical Reference.

To preview what USMT will migrate

  1. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as.

  2. Select an account with administrator privileges, supply a password, and then click OK.

  3. At the command prompt, type:

    cd /d <USMTpath>
    scanstate.exe /genmigxml:<filepath.xml>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools, and <filepath.xml> is the full path to a file where you can save the report. For example, type:

    cd /d C:\USMT
    scanstate.exe /genmigxml:"C:\Documents and Settings\USMT Tester\Desktop\genMig.xml"
    
  4. Open the file that ScanState generated at the location you specified. This guide shows the patterns that you will use in the migration when you run ScanState and specify the MigDocs.xml sample file in the command-line options.

  5. Find the component element for USMT Tester in the .xml file. It will look like this:

    <component type="Documents" context="STRESSMARMOT\USMT Tester" defaultSupported="Yes">
    

    Review the folders and file patterns that will be migrated for this account. For example, the following line shows that all files in the USMT Tester\My Documents folder will be migrated:

    <pattern type="File">C:\documents and settings\usmt tester\my documents\*[*]</pattern>
    

For more information on what USMT migrates and how to determine what types of files and settings are best to migrate for your organization, see Plan Your Migration.

For more information about customizing configuration files, see Customize USMT XML Files.

Run ScanState to Create a Migration Store on the Server

By default, the ScanState tool will create a compressed migration store. This guide uses the default compressed migration store that is applicable to both PC-refresh and PC-replacement scenarios. For most PC-refresh scenarios, however, you can also use a Hard-Link Migration Store, which improves performance. For more information, see Hard-Link Migration Store.

To create a migration store on a server

  1. Log on to the source computer as an account that has administrator privileges. This account should also have permissions to the network share where you will create your migration store.

  2. Open a command prompt. Click Start, click All Programs, click Accessories, and then click Command Prompt.

    Run ScanState on the source computer to collect files and settings. Type:

    cd /d <USMTpath>
    scanstate <StorePath> /i:migdocs.xml /i:migapp.xml /l:<logFilePath>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools. <StorePath> is the full path to a folder on a network server where you can create the migration store, and <logFilePath> is the full or relative path to a file where you can save the ScanState log information. For example, type:

    cd /d C:\USMT
    scanstate \\server\share\migration\mystore /i:migdocs.xml /i:migapp.xml /l:scan.log
    
  3. Optional: review the ScanState log. For more information about USMT errors, see User State Migration Tool (USMT) Troubleshooting.

Step 2: Install Windows

After you create a migration store on a server, you will install Windows 8 and load the files and settings from that migration store onto the destination computer. You can reformat the source computer (PC refresh) and use it as your destination computer, or you can use an additional computer (PC replacement).

You must install Windows 8 and any applications for which you will migrate files and settings onto your destination computer.

To install Windows

  1. If your computer contains user data, back up this data before reformatting.

  2. To start Windows Setup, insert the Windows 8 DVD while running Windows, choose your language options, and then click Install Now. If the autorun program does not open the Install Windows screen, browse to the root folder of the DVD and double-click setup.exe.

    Note

    You can use an unattended answer file to customize your Windows deployment. For more information, see Windows System Image Manager Technical Reference .

  3. Read and accept the Microsoft Software License Terms. Click I accept the License Terms (required to use Windows), and then click Next. If you click I decline (cancel installation), Windows Setup will exit.

  4. Click Custom (advanced).

  5. On the Where do you want to install Windows? screen, click Drive options (advanced).

  6. Click a partition, and then click Delete. Click OK if you want to delete the partition and any data on it.

  7. If there are additional partitions, repeat step 6 for each partition.

  8. Select the disk listed as unallocated space, and then click New.

  9. Enter a partition size, or click Apply.

  10. Click OK. Windows will create the new partition as well as a system partition.

  11. Select the new partition, and then click Format. Click OK if you want to reformat the partition and delete any data on it.

  12. Click Next.

    Windows Setup will proceed without further interaction.

For information about using USMT with WDS to install Windows and migrate user files and settings through your corporate network, see Step-by-Step: Migrating Files During a Remote Installation with USMT and Windows Deployment Services.

Install Applications

Although it is not always necessary, it is a best practice to install applications before loading files and settings from your migration store.

To install applications

  1. Install all user applications on the destination computer. The application version that is installed on the destination computer should be the same version as the one on the source computer. USMT does not support migrating the settings for an older version of an application to a newer version. The exception to this is Microsoft® Office, which USMT can migrate from an older version to a newer version.

    For more information about what applications and settings are supported in USMT, see What Does USMT Migrate?.

  2. Close all applications. If some applications are running when you run LoadState, USMT might not migrate all of the specified data. For example, if Microsoft Office Outlook® is open, USMT might not migrate .pst files, which, for example, store a user's local messages and calendar events.

Step 3: Apply Data Using the LoadState Tool

To apply migrated data to your hard drives, you connect the computer to your network, install USMT, and then run LoadState.

To connect the computer to your network

  1. Click Start, right-click My Computer, and then click Properties.

  2. Under Computer name, domain, and workgroup settings, click Change Settings.

  3. In the System Properties window, click Network ID.

  4. Use the Join a Domain or workgroup Wizard to connect to your local area network.

To install the USMT

  • Copy the USMT files and tools to the destination computer from the UFD or network share where you have saved them. For example, on the destination computer, at a command prompt, type:

    xcopy \\server\share\USMTx86 C:\USMT
    

To run LoadState

  1. Log on to the destination computer as an account that has administrator privileges. This account should also have permissions to the network share where you created your migration store.

  2. Open a command prompt. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as Administrator.

  3. Click Yes to open the command prompt.

  4. Run LoadState on the destination computer. Specify the same set of .xml files that you specified when using ScanState.

    cd /d <USMTpath>
    loadstate <storePath> /i:migdocs.xml /i:migapp.xml /lac /lae /l:<logFilePath>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools, <storePath> is the full path to a folder on a network server where you can create the migration store, and <logFilePath> is the full or relative path to a file where you can save the ScanState log information. For example, type:

    cd /d C:\USMTloadstate \\server\share\migration\mystore /i:migdocs.xml /lac /lae /i:migapp.xml /l:load.log
    

    Note

    The /lac and /lae options specify that local accounts, such as the USMT Tester account you may have created in step 1, will be created and enabled on the destination computer. Local account passwords will not be migrated. You can specify a new password for the account in the LoadState command line. If you do not specify a password, the password for the account will be blank by default. For more information, see LoadState Syntax.

  5. Optional: review the LoadState log file. For help with USMT errors, see User State Migration Tool (USMT) Troubleshooting.

After the computer has been restarted, you can verify that the USMT Tester account was successfully migrated and that the test documents are present on the new computer. You can log on to the USMT Tester account and verify the migration of any of the customizations you made in step 1.

Next Steps

For more information, see Customize USMT XML Files.

See Also

Other Resources

User State Migration Tool (USMT) Technical Reference
Windows ADK Overview