techmentor fall, 2011 - automating user data migration duing windows 7 migrations
DESCRIPTION
Deploying Windows 7 is a snap when you’re doing it to a brand new computer. But brand new computers are only part of the problem. What you also need is Windows 7 migration and upgrades. You also want a solution that refreshes Windows 7 with a minimum of effort. Part of doing that requires automatically offloading user data from their old computer, then injecting it onto their new one. There are free tools from Microsoft to do this, and they’re even customizable! Microsoft MVP and deployment expert Greg Shields shares the secrets of Microsoft’s User State Migration Toolkit, a sometimes-missed solution for automating user data migration that you’ll absolutely want in your deployment solution.TRANSCRIPT
Windows 7 Deployment Deep DiveWindows 7 Deployment Deep Dive
Automating User Data Migration Automating User Data Migration from Old Desktop to Newfrom Old Desktop to New
Greg Shields, MVP, vExpertGreg Shields, MVP, vExpertConcentrated Technologywww.ConcentratedTech.com
How Far We’ve Come…How Far We’ve Come…
1. Installing Windows Deployment Server
2. Configuring Image Deployment
3. Deploying your First Image
4. Dealing with Drivers
5. Automating WinPE Boot Image
6. Automating the “Set Up Windows” Phase
7. Creating a Thick Image w. Applications
8. Installing Microsoft Deployment Toolkit
9. Silent Installations & Repackaging
10. Layering Applications atop Windows
11. Preserving User Data
Step 11: Preserving PersonalityStep 11: Preserving Personality
Remember, we’re layering here!– Alright! Dead horse, really, really beaten by this point.
Microsoft Assessment& Planning Toolkit
Windows Automated Installation Toolkit & Windows Deployment Services
Windows Update Services
Group Policy Software Installation
Group Policy& Group Policy Preferences
Windows Profiles& User State Migration Toolkit
Core Operating System
Drivers
OS Updates
Applications
Configuration Changes
Planning & Analysis
Personality
Step 11: Preserving PersonalityStep 11: Preserving Personality
Remember, we’re layering here!– Alright! Dead horse, really, really beaten by this point.
Microsoft Assessment& Planning Toolkit
Windows Automated Installation Toolkit & Windows Deployment Services
Windows Update Services
Group Policy Software Installation
Group Policy& Group Policy Preferences
Windows Profiles& User State Migration Toolkit
Core Operating System
Drivers
OS Updates
Applications
Configuration Changes
Planning & Analysis
Personality
Secret Tip: Avoid re-layering configurations that are better managed via
GPs / GPPs.
Makes life easier both during and after the migration, as GPs & GPPs are long-lasting.
Step 11: Preserving PersonalityStep 11: Preserving Personality
MDT’s User State Migration Toolkit handles capturing and replacing user data.– Built directly into MDT. Updatable.
– Is easiest available when a deployment is started within the old operating system.
– Launch this to begin:\\{server}\deploymentshare$\scripts\LiteTouch.vbs
Secret Trick: This script can be wrapped into an HTA, or deployed via a GPP for improved automation.
Important Gotcha #1Important Gotcha #1
Seriously, get off the XP will ya’?
Important Gotcha #2Important Gotcha #2
Seriously, get off the x86 will ya’?
You can migrate a 32-bit operating system to a 64-bit operating system.
However, you cannot migrate a 64-bit operating system to a 32-bit operating
system.
Use Case #1 – PC RefreshUse Case #1 – PC Refresh
…using a compressed migration store.
…using a hard-link migration store.
…using Windows.old & a hard-link migration store.
Use Case #2 – PC ReplacementUse Case #2 – PC Replacement
…using a manualnetwork migration.
…using a managednetwork migration.
…using offline migrationvia Windows PE.
Important Gotcha #3Important Gotcha #3
USMT will not migrate the following settings…– Local printers, hardware-related settings, drivers,
passwords, application binary files, synchronization files, DLL files, or other executable files.
– Files and settings migrating between operating systems with different languages.
– Customized icons for shortcuts.
– Taskbar settings when the source computer is running Windows XP.
– Network printers and some firewall settings when the source computer is running Windows XP.
USMT’s Two StepsUSMT’s Two Steps
State Capture Phase– Capture User State
Initiates ZTIUserState.wsf /Capture
USMT’s Two StepsUSMT’s Two Steps
State Capture Phase– Capture User State
Initiates ZTIUserState.wsf /Capture
State Restore Phase– Restore User State
Initiates ZTIUserState.wsf /Restore
USMT’s Two StepsUSMT’s Two Steps
State Capture Phase– Capture User State
Initiates ZTIUserState.wsf /Capture
State Restore Phase– Restore User State
Initiates ZTIUserState.wsf /Restore
Both steps use settings (Rules) from CustomSettings.ini or within the MDT Database.– Do not modify ZTIUserState.wsf. Really.– Instead, customize the content it seeks to preserve.
Automating USMTAutomating USMT
Automating USMT requires answering its questions within MDT first.– This is done through the Rules tab under [Default].
Customizing USMT,Customizing USMT,Where Things Get HardWhere Things Get Hard
Three XML files are available out of the box:
MigApp.XML– Contains information about application settings to be
migrated.
MigUser.XML– Will migrate user profiles in a more general sense.– Focuses first on documents in user profile, then
globally by file extension.
MigDocs.XML– Used when tighter control over documents to be
migrated is required.
Customizing USMT,Customizing USMT,Where Things Get HardWhere Things Get Hard
Three XML files are available out of the box:
MigApp.XML– Contains information about application settings to be
migrated.
MigUser.XML– Will migrate user profiles in a more general sense.– Focuses first on documents in user profile, then
globally by file extension.
MigDocs.XML– Used when tighter control over documents to be
migrated is required.
You will use MigUser.XML or MigDocs.XML,but not both.
When in doubt, use MigUser.XML.
DEMO:DEMO:VIEWING THE MIGSVIEWING THE MIGS
What to Migrate?What to Migrate?
Determine what to migrate.– End-user information, applications settings,
operating-system settings, files, folders, and registry keys.
What to Migrate?What to Migrate?
Determine what to migrate.– End-user information, applications settings,
operating-system settings, files, folders, and registry keys.
Adding things to migrate…– is typically done by creating one or more custom
XML files.– You can alter the MIGs, but it gets complicated.
Removing things to migrate…– is done by creating and modifying a Config.XML file.Removing things is easier than adding them!
Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough
USMT will migrate a standard set of items.– Removing items from migration requires modifying
the MIGs with a Config.XML file.
First, create that Config.XML file.– Scanstate.exe /genconfig:<path>\Config.XML
/i:migapp.xml /i:miguser.xml
Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough
Open Config.XML in a text editor (not IE).
Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough
Open Config.XML in a text editor (not IE).
STEPPING BACK:
Consider this Config.XML file as a long list of all the possible things USMT could do.
Its contents are based on the instructions outlined in the MIGs, along with any custom XML files you create (a
process to be discussed in a minute).
With it, you can note the things you don’t want USMT to do.
Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough
Remove items by setting “migrate=no”.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Adding items to a migration requires creating one or more custom XML files.– These files contain the instructions telling USMT what
must be migrated – across both files and registry keys.– You must hand-code these.*
– * Sort of.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Adding items to a migration requires creating one or more custom XML files.– These files contain the instructions telling USMT
what must be migrated – across both files and registry keys.
– You must hand-code these.*
Adding items requires much of the same skills you learned in automatically deploying software.– Figuring out “what happened”.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Adding items to a migration requires creating one or more custom XML files.– These files contain the instructions telling USMT what
must be migrated – across both files and registry keys.– You must hand-code these.*
Adding items requires much of the same skills you learned in automatically deploying software.– Figuring out “what happened”.
Custom migration files are typically called in MDT after calling the MIGs.– Doing custom work last ensures that supporting data is
copied prior to custom data.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Migrate all the files in C:\UserDocuments and all subfolders, except for Sample.doc.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Migrate all the files in C:\UserDocuments and all subfolders, except for Sample.doc.
Notice how <include> and <exclude> items
are discretely configured…
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Secret Trick to migrate the “Presentations” folder, no matter where it
resides on C:.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Super Advanced Secret Trick:Use the .GenerateDrivePatterns method to
migrate any folder named “Requests” anywhere.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
Migrate registry values found in this location, whether in HKCU or HKLM.
Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult
<stuff> </stuff>
Syntax here is absolutely important,including case-sensitivity.
Bad syntax with XML means it no workey.
XML Validation, Will it Work?XML Validation, Will it Work?You’ll Need Some Help Here…You’ll Need Some Help Here…
XML Validation, Will it Work?XML Validation, Will it Work?You’ll Need Some Help Here…You’ll Need Some Help Here…
An XSD file is used to validate an XML file.USMT comes with one in /USMT/x64/MigXML.XSD.
Add it under Schemas and it will find errors.
XML Validation, Will it Work?XML Validation, Will it Work?You’ll Need Some Help Here…You’ll Need Some Help Here…
USMT Builder is a third-party solution. Far easier!
http://www.wintools.com.au/
Integrating MIGs with MDTIntegrating MIGs with MDT
Final step: Add the MIGs of importance to MDT.– Make sure to add them in the correct order.
Argh! ScanStateArgs!Argh! ScanStateArgs!
Not quite done.– We have decisions to make about how ScanState
should operate, specifically which users to migrate?
Argh! ScanStateArgs!Argh! ScanStateArgs!
Not quite done.– We have decisions to make about how ScanState
should operate, specifically which users to migrate?
– /all – Migrate all users.– /ui:DomainName\UserName – Migrate this user.– /ui:ComputerName\LocalUserName – Migrate this
user.
Argh! ScanStateArgs!Argh! ScanStateArgs!
Not quite done.– We have decisions to make about how ScanState
should operate, specifically which users to migrate?
– /all – Migrate all users.– /ui:DomainName\UserName – Migrate this user.– /ui:ComputerName\LocalUserName – Migrate this
user.
– /uel:NumberofDays – Migrate users who have logged on within the NumberofDays.
Argh! ScanStateArgs!Argh! ScanStateArgs!
Not quite done.– We have decisions to make about how ScanState should
operate, specifically which users to migrate?
– /all – Migrate all users.– /ui:DomainName\UserName – Migrate this user.– /ui:ComputerName\LocalUserName – Migrate this user.
– /uel:NumberofDays – Migrate users who have logged on within the NumberofDays.
– /ue:DomainName\UserName – Don’t migrate this user.– /ue:ComputerName\LocalUserName – Don’t migrate this
user.
Argh! ScanStateArgs!Argh! ScanStateArgs!
These are most effective in combination.– /ue:*.* = Exclude everyone, including local users.– /ui:AUTODEPLOY\* = Include all domain users.– /uel:60 = Include only those who logged on in last 60
days.
Special Note: Hard Link MigrationsSpecial Note: Hard Link Migrations
Network copies take time, lots of time. Hard Link Migrations eliminate some network
copies, reducing time to migrate.
– Hard link migrations keep files stored on the source computer during the migration.
– A hard link gives a file an additional path, which protects the file from deletion during the OS deployment.
– Hard links are created only for files on the same volume.– The hard link migration store should be removed after
the migration has completed (or files can’t be deleted!).– Works only (and by MDT default) with Refresh scenarios.
Configuring Migration MethodConfiguring Migration Method
The type of migration chosen is defined by the UserDataLocation value in MDT’s Rules tab.– AUTO will use Hard Link migrations for refreshes and
a network share for replaces.
Configuring Migration MethodConfiguring Migration Method
The type of migration chosen is defined by the UserDataLocation value in MDT’s Rules tab.– AUTO will use Hard Link migrations for refreshes and
a network share for replaces.
Suggest setting the following:– UserDataLocation=AUTO– UDShare=\\fileServer\fileShare– UDDir=%OSDComputerName%
Complete Automation!Complete Automation!Upgrade Computer ScenarioUpgrade Computer Scenario
Complete Automation!Complete Automation!Refresh Computer ScenarioRefresh Computer Scenario
Windows 7 Deployment Deep DiveWindows 7 Deployment Deep Dive
Automating User Data Migration Automating User Data Migration from Old Desktop to Newfrom Old Desktop to New
Greg Shields, MVP, vExpertGreg Shields, MVP, vExpertConcentrated Technologywww.ConcentratedTech.com