When it comes to backing up user data with USMT 4.0 [hardlinking] in SCCM, there are a few things that most people will want to do. Such as excluding local computer accounts and excluding domain user profiles older than XX days. It took a couple of days to get this figured out since there was no one blog post or forum topic which seemingly discussed both of these options.
First things first, read this excellent blog post on How to use USMT 4 hardlinking in a Configuration Manager 2007 Task Sequence
Now, USMT uses Scanstate.exe and Loadstate.exe to backup and restore users [respectively]. Local users can be excluded using switch /ue and old domain user profiles can be excluded using switch /uel. However, both of these switches cannot be used at the same time because of a precedence order. For more information, read Understanding USMT 4.0 Behavior with UEL and UE. So, to exclude local users and old domain users, set task sequence variables
- OSDMigrateAdditionalCaptureOptions = /nocompress /hardlink /uel:30 (or however many days you want it to be)
- OSDMigrateAdditionalRestoreOptions = /nocompress /hardlink /ue:%computername%\*
But there is also an undocumented problem. SCCM adds to the Scanstate/Loadstate parameters, specifically adding the /all switch which says to backup/restore ALL USERS. This completely goes against being able to use the /ue and/or the /uel switches and will cause scanstate/loadstate to fail!! So what must be done to fix the problem is to
- Select the step to Capture User Files and Settings
- Select option “Customize how user profiles are captured”
- Click the Files… button
- Add files MigUser.xml, MigApp.xml
- Repeat the above steps for Restore User Files and Settings
Updated 8/16 – USMT Best Practices states to not use MigUser.xml and MigDocs.xml together, so I’ve removed MigDocs from step 4.