A common requirement during user state migration is to not capture data from certain drives. The most commonly requested for exclusion are removable drives such as USB and FireWire drives. There is no command line option to exclude these drives automatically with USMT v3. I had to turn to scripting to accomplish this.
I created a script, ZTI-ExcludeDrivesXmlGen.wsf (and its function library HelperFunctions.vbs), that will generate a USMT XML rules file to unconditionally exclude USB and FireWire drives (as well as additional specified drives) during the deployment. The script should be run during the State Capture phase before Scanstate.exe is run. The resulting XML file should be used on both the Scanstate.exe and Loadstate.exe command lines. The script is driven by either command line switches or MDT properties:
Remember that the generated XML file must also be used with Loadstate.exe. Therefore, it must be saved to a location that from which it can be retrieved during the State Restore phase. I have included a script, ZTI-CopyFilesToStateFolder.wsf, to copy files to a subfolder of the state store location that can be used for this.
This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.
I was investigated about usmt 4.0 to do a better refresh, and i find some blog interested about: Frank
Where i should place these scripts as i want to avoid processing the data present in d or e drive which is taking so much time i need to migrate 100 xp system where users having much data in other than os drive so i want to exclude those drive pls help to provide the location for those script to exclude pls treat me as a new comer in MDT pls help
I put all the script in the MDT server in the deployment share -> scripts folder
Then edited the cs.ini as below
Properties=MyCustomProperty, USMTExcludeDrivesOutput, USMTExcludeUsbDrives, USMTExcludeScriptDrive, USMTExcludeDrives, USMTExcludeDriveFlagFile
PLS NOTE I HAVE NOT EDITED ANY OTHER SCRIPT THEN I TESTED THE INSTALLATION BUT IT DID NOT EXCLUDE THE DRIVES PLS HELP
Did you include the resulting XML file on either the USMT scanstate and loadstate command lines (/i:"%LogPath%\MigRootFolders.xml") or using the USMTMigFiles MDT property to specify this as a USMT XML file to use?
can someone help me to guide me for including the script in MDT 2010 i am new in MDT pls help me with detailed steps which i should make changes to exclude drives
This is great, thanks so much for this wonderful automagicall way of authoring XML for usmt.
Great script. I used it in an offline usmt scenario with USMT 5. I tried to keep things simple, so my steps to implement it were to: (1) copy the scripts into the MDT scripts folder (2) add a cscript command referencing the script before both the offline
usmt section and the restore (I was just excluding the scriptdrive): cscript //nologo "%SCRIPTROOT%\ZTI-ExcludeDrivesXmlGen.wsf" /scriptdrive (3) add the following parameter for the scanstateargs variable in customsettings.ini: /i:"%LogPath%\MigExcludeDrives.xml"
(4) add the following parameter for the loadstateargs variable in customsettings: /i:"C:\MININT\SMSOSD\OSDLOGS\MigExcludeDrives.xml"