Help with Win10 sysprep

I thought I was going to be in the clear, I made my way past all of the Generalize issues, removal of the MS Store app that I didn’t install, etc. Updated my unattend.xml and ran my scripted cleanup and sysprep. The script isn’t anything fancy, just a process to empty temp files and such.

Problem is after I capture and deploy the image, the target gets stuck at “Just a moment” and reboots. This isn’t a problem with imaging either, the source system does it also. I’ve pulled the event log from the machines and found what I’m pretty sure is the issues, I just have no idea what I can do about it.

@Wayne-Workman I would love to =)
However I would wait until I have finished my current project of using fog to upgrade all clients to windows 10 so that this method is more thoroughly tested first.
It’s tested, but not thorough and I will likely make some changes to my image prep script along the way. Then making it a wiki article will pretty much be copy paste from my documentation on the work project. Should be done by the end of next month, hopefully sooner, but I’m anticipating more troubles.

I have been using a custom script for a few years with Win7 that processes device drivers using this set of commands and a network driver store. Works great, I’ve got one image that works on at least a dozen different models of machine. As long as it’s AHCI and I’ve included the network drivers in the image all it good and it will send me an email when it’s done with the cleanup.

We need information in our #wiki on this area - please get with me when you have time via messaging.

I use one image for multiple hardwares without sysprep
I just had to figure out what sysprep was doing that was so important.

The biggest thing is uninstalling drivers.
But doing that manually in the device manager is time consuming and if you uninstall the wrong thing, you can lose your mouse.
What you need is devcon from the windows WDK. http://go.microsoft.com/fwlink/p/?LinkId=526733
Then copy devcon.exe from the install folder of the wdk to C:\Windows\System32 on your image

Thendevcon -r remove * Will uninstall all devices in the device manager like sysprep does and then it restarts, which would be your last step before imaging.

The downisde is that it ends up removing some devices used for remote desktop and they don’t auto reinstall.
But that’s fixed with this magic script FixRemoteDesktop.bat after imaging.

Then you don’t have to deal with slow buggy sysprep.
There are some other things that you had to do in the registry for windows 7 and 8 to reset the security id, but from what I can tell windows 10 does all that automagically when it finds itself on a new computer. But that might just be me being in an ignorant bliss.
But in the time I’ve been using this method I have had 0 residual driver issues on client computers.
So I recommend ditching sysprep and making your own imageprep

#wiki

We need an article talking ALL about everything you just said. Please get with me when you get time.

@John-Sartoris I would try those commands again while in audit mode. They 100% work for me on Enterprise 1511 (latest update, build 11586.104 I think?) while in audit mode using the built in admin account. You’ll see a bunch of failures for apps that cannot be removed (like Edge), but it still works. The Start menu should be pretty much empty once they’re run.

The commands worked, but I think I was removing something that I shouldn’t have. Initially I started removing the modern apps because of the “was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.” error. I think it started as “Microsoft.WindowsCamera” but I don’t have notes of that. Then it moved on to “NET-Framework-Core” I think. And at some point I removed “Microsoft.WindowsStore”, then it really wasn’t happy.

Anyway, I now have an image that sysprep, captures and restores. I’m ok having the stock apps available for now. I expect to find a way to remove/block unwanted ones with group policy or some other tool. If not I’ll make another revision of the image. I’ve still got plenty of testing and experimentation before our mass roll out to the majority of our 1300+ hosts.

@John-Sartoris I think Meraki may have added something for Win 10 in their latest Systems Manager release, but you’d need to be on the Enterprise version (free for 100 or less devices, paid otherwise).

@John-Sartoris I would try those commands again while in audit mode. They 100% work for me on Enterprise 1511 (latest update, build 11586.104 I think?) while in audit mode using the built in admin account. You’ll see a bunch of failures for apps that cannot be removed (like Edge), but it still works. The Start menu should be pretty much empty once they’re run.

@Arrowhead-IT Edge is also removed. We’re deploying Enterprise with all of the “Modern” apps removed at first. We’ll add some back later, but for now we’re starting with a minimal install.

Pretty much in the same boat here. We don’t like taking away features, but don’t have plans for them yet. We only have a hand full of windows touch devices, but we are talking about a student cart of Surface tablets for an art class. Need to find out about deployment tools for modern apps. Is it part of the Meraki free MDM?

I tried that when I started, unfortunately it didn’t seem to do anything for me. Then I found the “All Users” apps that also needed to be processed, and the “All Users” versions of the Remove commands don’t pipe. So you have to run each app manually, that where the script I linked to comes in.

@Arrowhead-IT said:

devcon -r remove *

I have been using a custom script for a few years with Win7 that processes device drivers using this set of commands and a network driver store. Works great, I’ve got one image that works on at least a dozen different models of machine. As long as it’s AHCI and I’ve included the network drivers in the image all it good and it will send me an email when it’s done with the cleanup.

Now to sort out if FOG can tell the difference between a workgroup and a domain. I know the answer in the past was no.

@Arrowhead-IT You will likely run into issues with WSUS and KMS without running sysprep. I’m not trying to convince you to switch your method which seems to work well for you guys, but just want to be sure people know what the risks are when they do not use the Microsoft method of creating images.

@MRCUR There is also a separate version of Windows 10 you can get with your volume licensing. The LTSB version takes out all the
“modern” apps plus the ability to just add the ones you want and don’t want I believe. I haven’t tried that as of yet

I use one image for multiple hardwares without sysprep
I just had to figure out what sysprep was doing that was so important.

The biggest thing is uninstalling drivers.
But doing that manually in the device manager is time consuming and if you uninstall the wrong thing, you can lose your mouse.
What you need is devcon from the windows WDK. http://go.microsoft.com/fwlink/p/?LinkId=526733
Then copy devcon.exe from the install folder of the wdk to C:\Windows\System32 on your image

Thendevcon -r remove * Will uninstall all devices in the device manager like sysprep does and then it restarts, which would be your last step before imaging.

The downisde is that it ends up removing some devices used for remote desktop and they don’t auto reinstall.
But that’s fixed with this magic script FixRemoteDesktop.bat after imaging.

Then you don’t have to deal with slow buggy sysprep.
There are some other things that you had to do in the registry for windows 7 and 8 to reset the security id, but from what I can tell windows 10 does all that automagically when it finds itself on a new computer. But that might just be me being in an ignorant bliss.
But in the time I’ve been using this method I have had 0 residual driver issues on client computers.
So I recommend ditching sysprep and making your own imageprep

While trying to answer @Wayne-Workman 's questions, I started to isolate my problem piece by piece. I installed an absolute fresh copy on Win10 ENT 1511 and ran my cleanup and sysprep. It broke in the same way. I repeated with just sysprep and it got past my problem, so it wasn’t sysprep, it was my cleanup…

I think I have it sorted. I know for sure I had 2 things happening. First was removing the background updated store apps. I reverted to my backup and followed the workaround I found…

Really MS??? don’t connect the computer to the network??? How is that possible with installing 60+ software packages and countless windows updates?

So rather than uninstalling the updates, the workaround is to login with a different user and delete the “setup” user profile, then run sysprep from the secondary account. I used a domain account for installing software from our network resource, and then used our backup local user for the clean and sysprep. This got me past the OP problem. I guess it was related to the store apps I removed. I was using this script to process them in bulk. But now I’m not doing that at all.

My second problem that showed up after this was fixed was with the <ComputerName> option. I tried it several ways and all I was getting was “could not parse or process” “[specialize]”. In the end I simply removed the line, and now it assigns a random name and completes, FOG will take care of the rest.

One other thing I found that I’m not sure about was adding the product key. I am using KMS and I thought I updated it from my Win7 file, but when I double checked it was missing.

Can you post the unattend file and whatever your cleanup script is? I just finished our initial batch of Win 10 Enterprise images and haven’t run into any issues with sysprep (I’m using our existing Win 7 sysprep file without any modifications).

@george1421 To have one image for many models, yes, sysprep is important.

But I keep one or more images per model. Storage is cheap and updates are easy to do. I think we’ve had this conversation before? lol

Either way anyone goes I totally respect their decision. But I personally value the simplicity of deployment (with the extra burden of time for building/updating many images) more than I do the complexities of building a single image that will work with many models.

If you are capturing and deploying to the same hardware sysprep is not (absolutely) necessary. If you have one image for 12 hardware platforms, its a bit more important. FWIW: We always sysprep images just post MDT build.