One of the advantages of integrating MDT 2008 with ConfigMgr 2007 is a more dynamic state capture process. The MDT task "Determine Local or Remote" (ZTIUserState.wsf) gives you the ability to estimate the amount of space required for the state store, and then determine whether to store it on the local hard drive or across the network on the ConfigMgr state migration point (SMP) role. One of the nice features of USMT is the ability to customize the capture through command line parameters and custom XML rule files. So how do you combine all of this into a single, custom, dynamic task sequence?
Let's say you have three custom XML files: CustomMigUser.xml, CustomMigApp.xml and Custom.xml (you're targets are Windows Vista so you're not using MigSys.xml), and you want to define the following USMT command line exclusions: /uel:60 /ue:contoso\~admin* /ue:* (exclude profiles older than 60 days, exclude all CONTOSO domain users that start with "~admin" and exclude all local users).
First, the requirements:
I find it easiest to create the packages by creating a task sequence from one of the MDT templates. The MDT wizard then walks you through the process.
Next let's look at the tasks:
After the OS deployment and configuration, use the Request State Store (with the USMTLocal condition), Restore User State (customized with your three XML files), and Release State Store (with the USMTLocal condition) tasks in a similar fashion. They'll automatically know to pull the state store from local storage or the SMP.
All done? Not yet. Using the OSDMigrateAdditionalCaptureOptions variable and custom XML files in the above tasks only apply to the ConfigMgr tasks that call USMT. The ZTIUserState script also calls ScanState from your USMT package, but by default doesn't know about your custom XML files and additional command line parameters. So with no other changes, you could potentially grossly overestimate the space required for your state store, and unnecessarily cause the state capture to use precious network bandwidth and time by going to the SMP when it could have used local storage. Especially if you're using command line parameters to exclude certain profiles which can significantly alter the size of the state store.
So how do we make ZTIUserState understand our customizations? Remember above we are using the MDT Gather task to define CustomSettings.ini in the MDT settings package. So now we need to add the following lines to CustomSettings.ini so that they match the customizations used by the ConfigMgr tasks:
USMTMigFiles1=CustomMigUser.xmlUSMTMigFiles2=CustomMigApp.xmlUSMTMigFiles3=Custom.xmlScanStateArgs=/uel:60 /ue:contoso\~admin* /ue:*
ZTIUserState uses these to add the customizations to the ScanState command line so that its estimation aligns with the actual capture.
I can't claim all of the above as my own - one of the MDT templates creates some those tasks with the proper conditions. Also I remember reading about some of the CS.ini inclusions for a better estimate, but now I can't find the source. If anyone knows who might have written about something similar, please let me know so I can give proper credit (e-mail or comment on this post).
Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.