kaese
tech, life, panda bears

December, 2020

MDT windows 10 SAC 20H2 (2009) sysprep and capture: the reckoning

Wednesday, December 16th, 2020

look, I get it. getting MDT compatibility working every time there’s a new version of windows 10 is NOT a fun time for developers. there are so many nooks and crannies in code to consider, and I don’t envy that team.

HOWEVER.

I am amazed at the inconsistencies when using MDT each and every version of windows 10. 1607, especially LTSB, was a breeze. 1809, not so bad. just removed a bunch of store apps using powershell and things shook out okay. 1909, well that was a bit of a bitch with the store apps. but I was able to automate more stuff thanks to the power of REG IMPORT and other neat things. then came 20H2/2009…

I did my normal stuff. copied the templates from last year, applied the new base ISO for 20H2, then configured a VM to take the new build. after I set up everything on the VM how I like, the capture wouldn’t work. it literally would say it completed but did NOTHING after freezing on the “configure” task and happily breezing past the rest of the task sequence. what do? well, apparently there are capture bugs where legacy BIOS doesn’t work anymore. I downloaded and applied the new DLL’s recommended by microsoft. did that fix it? NOPE.

after several failures, I decided to build out my first EFI virtual machine. not that tough. vmware is pretty good about options. I sent the build out again. configured what I needed to. ran the capture. it failed. well, just dandy. built it again, as a base image, no configs, and captured. IT WORKED. now what? I need all my pretty configurations and applications.

so I built the VM from base, again. and messed with it a little. capture worked. great! except… I didn’t do one of my primary application installations in my rush to test. no problem; I’ll just do that and capture just like before. BUT IT FAILED. after it rebooted post sysprep, it just loaded back into windows!!! what the fuuuuuuuuuuu-

so I said screw this, I’m going to start again again (again), and booted into PXE. but DO YOU KNOW WHAT STARTED ON ITS OWN? the “create WIM” task. okay. so it’s something to do with reboots? after doing some reading on reddit, I felt better about my deduction.

THE CONCLUSION: before I start my sysprep and capture task sequence, I wipe out ALL customsettings.ini EXCEPT:
[Settings]
Priority=TaskSequenceID, Default
Properties=MyCustomProperty

[Default]
SkipDomainMembership=YES
SkipProductKey=YES
SkipComputerBackup=NO
DoCapture=YES
SkipCapture=NO
SkipAdminPassword=YES
FinishAction=Shutdown
SLShareDynamicLogging=\\address\deploymentshare$\Logs\%OSDComputerName%
EventService=http://address
ComputerBackupLocation=%DEPLOYROOT%\Captures


Then I have to set the VM to boot to the BIOS menu on next reboot, so I can manually choose PXE, to properly capture the WIM. THEN I start the sysprep and capture task sequence. whyyyyyy?!?!? I DON’T KNOW. but this is what I’m doing now.