techmentor fall, 2011 - automating user data migration duing windows 7 migrations

47
Windows 7 Deployment Deep Dive Windows 7 Deployment Deep Dive Automating User Data Automating User Data Migration from Old Desktop to Migration from Old Desktop to New New Greg Shields, MVP, vExpert Greg Shields, MVP, vExpert Concentrated Technology www.ConcentratedTech.com

Upload: concentrated-technology

Post on 12-May-2015

711 views

Category:

Technology


3 download

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

Page 1: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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

Page 2: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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

Page 3: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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

Page 4: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 5: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 6: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Important Gotcha #1Important Gotcha #1

Seriously, get off the XP will ya’?

Page 7: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 8: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 9: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Use Case #2 – PC ReplacementUse Case #2 – PC Replacement

…using a manualnetwork migration.

…using a managednetwork migration.

…using offline migrationvia Windows PE.

Page 10: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 11: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

USMT’s Two StepsUSMT’s Two Steps

State Capture Phase– Capture User State

Initiates ZTIUserState.wsf /Capture

Page 12: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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

Page 13: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 14: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Automating USMTAutomating USMT

Automating USMT requires answering its questions within MDT first.– This is done through the Rules tab under [Default].

Page 15: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 16: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 17: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

DEMO:DEMO:VIEWING THE MIGSVIEWING THE MIGS

Page 18: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

What to Migrate?What to Migrate?

Determine what to migrate.– End-user information, applications settings,

operating-system settings, files, folders, and registry keys.

Page 19: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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!

Page 20: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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

Page 21: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough

Open Config.XML in a text editor (not IE).

Page 22: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 23: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Removing Items from MigrationRemoving Items from MigrationNot that ToughNot that Tough

Remove items by setting “migrate=no”.

Page 24: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 25: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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”.

Page 26: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 27: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 28: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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…

Page 29: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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:.

Page 30: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 31: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Adding Items to MigrationAdding Items to MigrationMuch more DifficultMuch more Difficult

Migrate registry values found in this location, whether in HKCU or HKLM.

Page 32: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 33: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

XML Validation, Will it Work?XML Validation, Will it Work?You’ll Need Some Help Here…You’ll Need Some Help Here…

Page 34: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 35: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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/

Page 36: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 37: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Argh! ScanStateArgs!Argh! ScanStateArgs!

Not quite done.– We have decisions to make about how ScanState

should operate, specifically which users to migrate?

Page 38: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 39: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 40: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 41: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 42: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 43: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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.

Page 44: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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%

Page 45: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Complete Automation!Complete Automation!Upgrade Computer ScenarioUpgrade Computer Scenario

Page 46: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

Complete Automation!Complete Automation!Refresh Computer ScenarioRefresh Computer Scenario

Page 47: TechMentor Fall, 2011 - Automating User Data Migration Duing Windows 7 Migrations

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