Designing a Client Life Cycle for Windows 7 Desktop Administrators

  • 10/11/2010

Lesson 3: Migrating User Profiles

From a user’s perspective, a successful migration to Windows 7 means that all of the data that the user relied upon on her old computer is present and available on her new computer. When you have to move only a few users to new computers, you can take time and care to ensure that every bit of data and setting that was present on the previous computer is available to users on their new systems. When you need to move user profile data on several thousand computers, you do not have the time to provide this personal attention to detail. In this lesson, you learn how to automate the collection and migration of important user data. This ensures that that you can move large numbers of users to computers running the Windows 7 operating system, while ensuring that all the files and settings that the users needed from their old systems remain available.

Understanding Migration Circumstances

Unless your organization uses roaming user profiles, the computer that a person uses probably has important data stored locally. Migrating users from the Windows XP or Windows Vista operating systems to Windows 7, or even migrating them from one computer running Windows 7 to another, means that you must get all important data from one local computer to the next. You can view user profile data by opening the System item within Control Panel and then opening the User Profiles area of the Advanced tab, as shown in Figure 2-6. You can use this tool to copy user profile data to another location, but you cannot use this tool to import user profile data.

Figure 2-6

Figure 2-6 User profile data

When you are considering the migration of a large number of users from one platform to another, you must address the following factors:

  • Choosing what type of migration you will perform. Will you be migrating users to new computers, a task known as PC replacement, or will you be upgrading their current computers, a task known as a PC refresh?

  • Choosing where migrated data will be stored during the migration. If you are moving a large number of users, you may need to use a network migration store. This can cause problems if you are not careful about cataloging the location of each migrated user profile store.

  • Choosing an appropriate migration tool. In small migrations, you may choose to use Windows Easy Transfer, a tool built into the Windows 7 operating system. In larger migrations, you are more likely to choose the User State Migration Tool, a tool available as a free download from Microsoft.

If you are moving users of a small number of computers, you should consider using Windows Easy Transfer rather than other tools. Windows Easy Transfer is a utility built into the Windows 7 operating system that allows you to move user profile data from one location to another. The tool is wizard driven, which simplifies use and allows migration of the most common user profile components. You can use Windows Easy Transfer to migrate user profile data from computers running the Windows XP, Windows Vista, and Windows 7 operating system to computers running the Windows 7 operating system. The drawback of Windows Easy Transfer is that you cannot automate the utility, which makes migrating user profile data for a large number of computers prohibitively time consuming.

Choosing a Migration Type

The nature of your task influences the migration type you ought to choose. Depending on whether you are migrating user profile data because you are replacing an existing computer’s operating system or because you are moving a user from one computer to another, one type is more suitable than another. These are the two basic types of migration:

  • Wipe-and-load migration This is appropriate when the current hardware can support a new operating system. Sometimes people refer to this as a PC Refresh scenario. For example, you are deploying the Windows 7 operating system to a group of users whose computers are presently running the Windows XP operating system. In most cases with a wipe-and-load migration, you move user data, format the hard disk drive, and then perform a clean installation of the new operating system, importing the new data after the clean installation completes. You can use the local hard disk as a migration store in a wipe-and-load migration. You can keep the data on the computer during the migration or use a remote store, such as a network location or a removable storage device.

  • Side-by-side migration This is appropriate when you are replacing the user’s current computer with a new computer. People also refer to this type of migration as a PC Replacement scenario. For this type, you need to use an intermediate store for the migrated data that is accessible to both the current and replacement computer. This intermediate store might be a network location or could be a removable storage device.

You can perform an upgrade only when users already have Windows Vista installed on their original computer. Upgrades are possible only across versions of the operating system that support the same processor architecture. For example, you can upgrade an x86 version of Windows Vista to an x86 version of Windows 7, but you cannot upgrade an x86 version of Windows Vista to an x64 version of Windows 7. To transition from an x86 to an x64 edition requires that you perform a migration rather than an upgrade.

User State Migration Tool

The User State Migration Tool (USMT) is a command-line utility that you can use to automate the task of migrating user profiles in wipe-and-replace and side-by-side migrations. USMT is a part of the Windows AIK and is designed to be used in highly automated migration scenarios. USMT migrations occur in two phases: in collecting profile data from the source computer using Scanstate.exe and in importing profile data to the destination computer using Loadstate.exe. In PC Refresh scenarios, the source computer and the destination computer are the same machine.

USMT allows you to capture user accounts, user files and folders (including NTFS permissions), operating system settings, and application settings. You can use USMT to migrate profile data to destination computers running Windows 7 from source computers running the Windows XP, Windows Vista, and Windows 7 operating systems. You cannot use USMT to migrate settings for mapped network drives, local printers, device drivers, local user account passwords, shared folder permissions, and Internet connection sharing settings.

Configuring USMT Migration Settings

If you use USMT with basic options, it moves the most common application settings as well as data from folders most commonly used to store documents. Although this selection works in most cases, many organizations use unique local storage configurations and deploy unusual applications. You can configure USMT to migrate data stored from these unique locations and unusual applications by configuring an appropriate XML-formatted configuration files. Here are the XML-formatted configuration files that you can use with USMT:

  • MigUser.xml This file contains rules about user profiles and user data. The default settings for this file move all data in My Documents, My Video, My Music, My Pictures, desktop files, Start Menu, Quick Launch settings, Favorites, Shared Documents, Shared Video, Shared Music, Shared desktop files, Shared Pictures, Shared Start menu, and Shared Favorites. This file also contains rules to ensure that all the following file types are migrated from fixed volumes: .qdf, .qsd, .qel, .qph, .doc, .dot, .rtf, .mcw, .wps, .scd, .wri, .wpd, .xl*, .csv, .iqy, .dqy, .oqy, .rqy, .wk*, .wq1, .slk, .dif, .ppt*, .pps*, .pot*, .sh3, .ch3, .pre, .ppa, .txt, .pst, .one*, .mpp, .vsd, .vl*, .or6, .accdb, .mdb, .pub, .xla, .xlb, and .xls. The asterisk (*) represents zero or more characters.

  • MigDocs.xml This file contains information about the location of user documents. Use this file if local user documents are stored in nonstandard locations.

  • MigApp.xml This file contains rules about migrating application settings. These include Accessibility settings, dial-up connections, Favorites, folder options, fonts, group membership, Open Database Connectivity (ODBC) settings, Microsoft Office Outlook Express mailbox files, mouse and keyboard settings, phone and modem options, Remote Access Service (RAS) connection phone book files, regional options, remote access, screen-saver settings, taskbar settings, and wallpaper settings.

  • Config.xml This file is used to exclude features from the migration. You can create and modify Config.xml using Scanstate.exe with the /genconfig option.

In some situations, there may be files or application settings that are not migrated when you configure the XML files listed in the preceding paragraphs. In these instances, you must create a custom XML file. You can also use custom XML files to reroute folders, specific file types, or specific files. Rerouting is the process by which you move all files of one type that may have been stored in separate places on the source computer to a specific, final location on the destination computer.


Scanstate.exe runs on the source computer. If you are running Scanstate.exe from within Windows on computers that have either the Windows Vista or Windows 7 operating system, you must do so from an elevated command prompt. If you are running Scanstate.exe on a computer running the Windows XP operating system, you must be logged on with an account that is a member of the local administrators group.

You can use Scanstate.exe to perform an offline migration of data. An offline migration occurs when you run Scanstate.exe from the Windows PE environment, rather than from a client Windows operating system environment. The benefit of performing an offline migration is that it occurs more quickly than when you perform an online migration. You can configure a special bootable Windows PE image that performs an automatic offline migration. You can also deploy this image using Windows Deployment Services, which allows you to perform automatic offline migrations on a computer from a PXE boot. Although you can use Scanstate.exe in offline mode, you cannot use Loadstate.exe in this manner. You must always run Loadstate.exe from within the Windows client operating system environment.

Scanstate.exe is a command-line utility. When using Scanstate.exe, you must specify the location in which the migration store will be hosted. The following command creates an encrypted migration store named store123 on the file share named Migration on the file server named Fileserver and uses the files MigApp.xml and MigUser.xml. You encrypt the store using the key mykey:

Scanstate \\fileserver\Migration\store123 /i:MigApp.xml /i:MigUsr.xml /o /encrypt /


You run the Loadstate.exe utility from an elevated command prompt on the destination computer. You should install all applications that were on the source computer on the destination computer prior to running Loadstate.exe. If you install applications on the destination computer after running Loadstate.exe, individual application settings might be overwritten by the new installation.

You need to use the same custom XML files when using the Loadstate.exe utility to restore data if you used custom XML files during the Scanstate.exe process. For example, to load data from the store123 store that you created in the example earlier in this chapter, you would use this command:

Loadstate \\fileserver\Migration\store123 /i:MigApp.xml /i:MigUsr.xml /decrypt /key:"mykey"

Selecting a Migration Store

When you have determined exactly what files and settings you need to migrate from the source computer to the destination computer, you need to determine which type of migration store you will use. Although you can use a removable storage device as a migration store, most administrators do not use this option when they are moving a large number of user profiles. This store type requires the technician performing the migration to attach and detach the device as a part of the migration process. This level of manual intervention can significantly lengthen the migration process when you are dealing with several thousand computers. If you choose to use a network share as a migration store host, you need to consider the amount of storage space required and the possible impact on network bandwidth of transferring a substantial amount of user profile data to and from the network share as the migration progresses. USMT supports three general migration store types:

  • Uncompressed This type holds data in a hierarchy of folders that mirror the user profile data that is being transferred. Uncompressed migration stores create a duplicate of the migrated data in a separate location on the original volume, on an attached volume, or on a remote location such as a network share. You can navigate the folder hierarchy using Windows Explorer or the command line. Uncompressed migration stores are not encrypted when created by the Scanstate.exe utility, and they lack the security of other migration store types. When you are moving multiple computers by using uncompressed migration stores on a shared network folder, you need to ensure that each migration store is written to a separate folder location on the store.

  • Compressed This type writes all migration data to a single compressed file. You can encrypt this file. You can extract the data located in this file using the Loadstate.exe utility. When you move data for multiple computers by using compressed migration stores, ensure that the resulting migration store has a unique name that allows you to tie it back to the computer that you migrated from.

  • Hard-link You can use hard-link migration stores only in wipe-and-load migrations. The hard-link migration store allows files to be stored on the local computer while the old operating system is removed entirely and a new operating system is installed. Hard-link migrations do not create a duplicate of the migrated profile data and use less space than an uncompressed or compressed migration store. You cannot use a hard-link migration store when you are using a network share as a storage location.

You should consider the security of uncompressed and compressed migration stores that are located on shared network folders. If the security of user profile data is a concern during a migration, you should use a compressed migration store with encryption. This method minimizes the risk that unauthorized third parties are able to access user profile data during the migration process. You configure an encrypted migration store in the practice exercise at the end of this lesson.

Estimating Storage Requirements

You can use Scanstate.exe to determine the amount of space required for each storage type on a computer given a specific set of migration rules. This can be useful when you are planning a migration and you do not know how much data actually has to be stored. The migration report is written in XML format. You can open the report for review using Windows Internet Explorer, as shown in Figure 2-7.

Figure 2-7

Figure 2-7 Migration store report

You run the following command to generate an estimate of the migration store size:

Scanstate.exe c:\migrationstore /o /p:"C:\migrationstoresize.xml"

Practice: Using USMT

USMT allows you to automate the process of migrating user profile data. In this set of practice exercises, you perform several steps that you would perform with USMT when preparing to migrate profile data. These include creating an estimate of the size of the migration store, creating a custom XML file that has the location of any nonstandard document directories and then creating an encrypted migration store.

EXERCISE 1 Creating an Estimate of the Migration Store Type

Prior to performing this practice exercise, ensure that the Windows Automated Installation Kit is already installed on WKSTN1. To complete this exercise, follow these steps:

  1. Log on to computer wkstn1 with the Mark Lee user account.

  2. Create the directories c:\mig-store, c:\mig-reports, and c:\usmt.

  3. Depending on whether your Windows 7 installation is x86 or x64, copy the contents of the c:\Program Files\Windows AIK\Tools\USMT\x86 or c:\Program Files\Windows AIK\Tools\USMT\amd64 directories to the c:\usmt directory.

  4. Run the following command to generate an estimate of the migration store size:

    C:\USMT\scanstate.exe c:\mig-reports /p:"c:\mig-reports\MigrationStoreSize.xml"
  5. Use Internet Explorer to open the file c:\mig-reports\MigrationStoreSize.xml.

  6. Run the following command to create an encrypted store:

    C:\usmt\scanstate c:\mig-store /encrypt /key:"Pa$$w0rd"
  7. Verify that the migration store has been created in the c:\mig-store directory.

Lesson Summary

  • The User State Migration Tool can be automated to migrate profile data.

  • The process of replacing the operating system on a computer is known as a PC Refresh scenario or as a wipe-and-load migration. You can use a hard-link migration store during this type of migration if you want to minimize the use of disk space.

  • The process of replacing an old computer with a new computer is called a PC Replacement scenario or side-by-side migration. You cannot use a hard-link migration store for this type of migration.

  • Scanstate.exe is run on the source computer. Loadstate.exe is run on the destination computer.

  • USMT uses XML configuration files such as MigUser.xml, MigApp.xml, and MigDocs.xml to control which data is migrated from the source computer to the destination computer.

Lesson Review

You can use the following questions to test your knowledge of the information in Lesson 3, “Migrating User Profiles”. The questions are also available on the companion CD if you prefer to review them in electronic form.

  1. Your organization has just purchased 400 new computers and you need to move user data from 400 existing installations in a side-by-side migration. These computers run a mix of Windows 2000 Professional, Windows XP Professional, Windows Vista, and the Windows 7 operating systems. You want to extract data from as many computers as possible by performing an offline migration with the User State Migration Tool. Which of these operating systems support this type of migration? (Choose all that apply; each answer forms a complete solution.)

    1. Windows 7

    2. Windows XP Professional

    3. Windows Vista

    4. Windows 2000 Professional

  2. Which of the following XML files do you modify to specify information about a custom user documents folder when you use the User State Migration Tool?

    1. MigApp.xml

    2. Config.xml

    3. MigUser.xml

    4. MigDocs.xml

  3. Which of the following migration store types support encryption when you use Scanstate.exe?

    1. Hard-link migration

    2. Uncompressed Remote Store

    3. Compressed Remote Store

    4. Uncompressed Local Store

  4. Which of the following migration store types should you use when you have to perform a wipe-and-load migration on a large number of computers, you want to ensure that no data is transferred from the computers, and that a minimum amount of disk space is used?

    1. Compressed remote store

    2. Uncompressed local store

    3. Hard-link migration store

    4. Compressed local store