Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
This article outlines the general process to follow to migrate files and settings.
Step 1: Download and install USMT
USMT is part of the Windows Assessment and Deployment Kit (Windows ADK) and can be downloaded from the following link:
Download and install the Windows ADK
Once the Windows ADK installer is downloaded, run the installer, and then in the Select the features you want to install page, make sure User State Migration Tool (USMT) is selected.
Step 2: Plan the migration
Plan The Migration. Depending on whether the migration scenario is refreshing or replacing computers, an online migration or an offline migration can be chosen. Offline migrations can use either Windows Preinstallation Environment (WinPE) or the files in the Windows.old directory. For more information, see Common Migration Scenarios.
Determine What to Migrate. Data to consider migrating includes end-user information, applications settings, operating-system settings, files, folders, and registry keys.
Determine where to store data. Depending on the size of the migration store, data can be stored in one of the following locations:
- Remotely.
- Locally in a hard-link migration store or on a local external storage device.
- Directly on the destination computer.
For more information, see Choose a Migration Store Type.
Use the
/GenMigXMLcommand-line option to determine which files are included in the migration, and to determine whether any modifications are necessary. For more information, see ScanState SyntaxIf necessary, modify copies of the
Migration.xmlandMigDocs.xmlfiles and create custom .xml files. To modify the migration behavior, such as migrating the Documents folder but not the Music folder, custom .xml file can be created or modify the rules in the existing migration .xml files. The document finder, orMigXmlHelper.GenerateDocPatternshelper function, can be used to automatically find user documents on a computer without creating extensive custom migration .xml files.Important
Microsoft recommends to always make copies of the .xml files included in User State Migration Tool (USMT) and then modify the copies. Never modify the original .xml files.
The
MigXML.xsdfile can be used to help write and validate the .xml files. For more information about how to modify these files, see USMT XML Reference.Create a Config.xml File if to exclude any components from the migration. To create this file, run the
ScanState.execommand with the following options:- /genconfig.
- /i - as arguments specify the .xml files that are being used with
ScanState.exe.
For example, the following command creates a
Config.xmlfile by using theMigDocs.xmlandMigApp.xmlfiles:ScanState.exe /genconfig:Config.xml /i:MigDocs.xml /i:MigApp.xml /v:13 /l:ScanState.logOpen the
Config.xmlthat was generated in the previous step. Review the migration state of each of the components listed in theConfig.xmlfile. If necessary, edit theConfig.xmlfile and specifymigrate=nofor any components that don't need to be migrated.
Step 3: Collect files and settings from the source computer
Back up the source computer.
Close all applications. If some applications are running when the
ScanState.execommand is run, USMT might not migrate all of the specified data. For example, if Microsoft Office Outlook is open, USMT might not migrate PST files.Note
USMT fails if it can't migrate a file or setting unless the
/coption is specified. When the/coption is specified, USMT ignores the errors, and logs an error every time that it encounters a file that is being used that USMT didn't migrate. The<ErrorControl>section in theConfig.xmlfile can be used to specify which errors should be ignored, and which should cause the migration to fail.To collect files and settings, run the
ScanState.execommand on the source computer. All of the .xml files that theScanState.execommand needs to use should be specified. For example,ScanState.exe \\server\migration\mystore /config:Config.xml /i:MigDocs.xml /i:MigApp.xml /v:13 /l:ScanState.logNote
The
ScanState.execommand must be run in Administrator mode on the source computer. To run in Administrator mode, right-click Command Prompt, and then select Run As Administrator. For more information about how theScanState.execommand processes and stores the data, see How USMT Works.To ensure that the created store isn't corrupted, run the
UsmtUtils.execommand with the/Verifyoption.
Step 4: Prepare the destination computer and restore files and settings
Install the operating system on the destination computer.
Install all applications that were on the source computer. Although it isn't always required, Microsoft recommends installing all applications on the destination computer before restoring the user state. Installing all applications before restoring user state makes sure that migrated settings are preserved.
Note
The application version that is installed on the destination computer should be the same version as the one on the source computer. USMT doesn't support migrating the settings for an older version of an application to a newer version. The exception for this rule is Microsoft Office. USMT can migrate from an older version of Microsoft Office to a newer version of Microsoft Office.
Close all applications. If some applications are running when the
LoadState.execommand runs, USMT might not migrate all of the specified data. For example, if Microsoft Office Outlook is open, USMT might not migrate PST files.Note
Use
/cto continue the migration if errors are encountered. Use the<ErrorControl>section in theConfig.xmlfile to specify which errors should be ignored, and which errors should cause the migration to fail.Run the
LoadState.execommand on the destination computer. Specify the same set of .xml files that were specified when theScanState.execommand was used. However, theConfig.xmlfile doesn't always need to be specified. TheConfig.xmlfile only needs to be specified to exclude some of the files and settings that were migrated to the store. For example, the Documents folder was migrated to the store, but doesn't need to be migrated to the destination computer. For example, modify theConfig.xmlfile and specify the updated file by using theLoadState.execommand. Then, theLoadState.execommand migrates only the files and settings that need to be migrated. For more information about how theLoadState.execommand processes and migrates data, see How USMT Works.For example, the following command migrates the files and settings:
LoadState.exe \\server\migration\mystore /config:Config.xml /i:MigDocs.xml /i:MigApp.xml /v:13 /l:LoadState.logNote
Run the
LoadState.execommand in administrator mode. To do this, right-click Command Prompt, and then select Run As Administrator.Sign out after running the
LoadState.execommand. Some settings, such as fonts, wallpaper, and screen saver settings, won't take effect until the next time that the user logs on.