Wanna talk?
What Am I Doing?
Categories

Entries in deployment (2)

Sunday
Nov282010

Auto Removal of MDT State Folders

When you're building and testing MDT deployments as often as I do, you appreciate scripting and automation. Often times, I'm wiping and kicking off deployments within WinPE. You hit go, wait awhile and then you find something that needs to be modified either in the image or part of the task sequence. You make the change in MDT and...

You need to retest.

So you restart the PC (or VM in many of my scenarios) and boot back into WinPE. You expect to find the Welcome to Windows Deployment wizard but instead you find an error message indicating that the installation cannot continue due to the fact that it is in WinPE. What is happening?

In order to maintain deployment state across reboots, the task sequencer writes variables and logs in two specific locations: %SYSTEMDRIVE%\_SMSTSequence and also %SYSTEMDRIVE%\MININT. When WinPE boots, it looks in these locations to see if there is any information it needs. Problem is, most of the time when you're entering into WinPE you're there to wipe and reload the OS, not to continue OS installation. What needs to happen, in the words of Johan Arwidmark is to "get rid of the junk".

What we want to do is remove these folders before the Deployment Wizard discovers them and throws an error. You can add a command script to the Unattend.xml of WinPE inside the RunSynchonous element. The command script would perform something like this:

If Exist C:\MININT\nul rd C:\MININT /s /q
If Exist C:\_SMSTaskSequence\nul rd C:\_SMSTaskSequence /s /q

Check out the reference below to read more about this and also check out Johan's other blog post's at http://www.deployvista.com. He has some great content.

Friday
Oct152010

Tricky USMT, tricky…

The User State Migration Tool is part of the Windows Automated Installation Kit (WAIK) and it’s purpose is exactly that: transfer “user state” from one operating system to another. Although editing the XML can get complex, I found the Technet library reference on it very helpful and complete, or almost.

Our client had space limitations just like everyone else and to help mitigate some of these issues, we set a configuration parameter on scanstate.exe so that any Windows profiles that hadn’t been logged into in 60 days would not get captured. That flag is /UEL:60.

At the same time, we didn’t want certain profiles to be captured either…say for instance the local Administrator account. So for this we specified /UE:%COMPUTERNAME%\Administrator on the scanstate.exe command line as well.

I won’t go into extreme detail, but in short this does not work. USMT has specific rules of precedence depending on the switches and they don’t always merge. If you use the UEL and you specify an UE exclusion, if that UE exclusion has logged in within 60 days that profile will get captured. UEL will take precedence. You can get around this in your deployment by creating a task sequence step to run a tool to remove unwanted profiles before you perform a USMT capture. Check the references section for a blog entry describing this in more detail and a reference on USMT ScanState tool.

This caused my team headaches and I hope this helps other engineers so they don’t have to self medicate as much as I did in their deployments.