Click on Pictures to View

To view a larger version of an image within a post, just click on the picture you want to view :)

Wednesday, July 27, 2016

Sysprep Windows 10

So I was needing to prepare a VMware Fusion virtual machine for embedding in our NetRestore image we deploy to all of our new MacBooks.  We recently decided to upgrade / deploy all Virtual Machines on Macs with Windows 10 rather than Windows 7.

At first I ran into a few problems, which ended up being rather silly things that I simply overlooked.
Anyway, here's the process I used to successfully SysPrep a Windows 10 virtual machine for distribution.

1.  I first imaged a virtual machine with a fresh copy of our corporate Windows 10 base load image.  I actually did this using an ISO created with SCCM to essentially PXE boot the vm and pull the image down over the network from our SCCM server / distribution point (DP)

2.  Our corporate base load has a known local administrator account already configured with a known password.  If you are unsure of the password of an account already created or if there is not a local admin account, etc, just create a new local user account with a password set to never expire.  Don't forget to remove that newly created user account from the "User" group membership, and instead add it to the "Administrators" group, or else you won't have local admin rights.

3.  Next, our newly imaged virtual machine was automatically joined to the domain during the imaging process.  So the next step was to remove the machine from the domain (this is also why a local administrator account with a known password is needed - so you can log on to the machine after removing it from the domain).  So in the computer's properties, move the computer off the domain and into a workgroup.  Then save and or apply, and OK and it will prompt for a reboot.  Say yes to reboot.

4.  After the vm rebooted, I logged in with our local admin account with known password.  After logging in, I also disabled our anti-virus to head off any issues or potential errors from being thrown during or after the next step (it re-enables and updates itself anyway once booting up the sysprepped machine)

5.  Then I launched an elevated command prompt (right click "cmd" & run as administrator).  Changed directory to Sysprep directory:  cd C:\Windows\System32\Sysprep
Then typed "sysprep" (without quotes) and pressed enter.  This brought up a little GUI dialog box.

6.  The settings to use are "Enter System Out-Of-Box Experience (OOBE)" with the "Generalize" box checked, and Shutdown Option of "Shutdown".  This will sysprep this very machine and shut it down, so you can then copy it for distribution.  When you launch this shut down machine or any of its copies, it is a brand new "box" with unique SSID and computer name, etc.  During the initial boot up, it asks if you want to join to a domain or not, followed by creating a new local user account for the new machine you are booting up.  This must be a different account than the one used to do the sysprep process.


Here are a few notes:

- Make sure you are not joined to any domain prior to running Sysprep tool - it will throw an error either during the sysprep process, or after opening the sysprepped OS (see below error)

- If the local administrator account is disabled by default, before removing from the domain, right click the admin account in Computer Management Users & Groups and uncheck "Account is disabled"
- If you launch the same file you just sysprepped without making a copy, you will no longer have your original shutdown file and will probably have to start over either from the very beginning or relaunch the sysprep GUI and run sysprep again to create a usable file to copy for distribution
- If you imaged a vm and are getting ready to run sysprep on it but are unsure about anything, make a copy BEFORE running sysprep.  This way you have an already imaged backup machine and don't have to reimage another one should something fail or go awry.


Sources:

https://redmondmag.com/articles/2016/03/04/sysprep-work-with-windows-10-2.aspx

https://superwidgets.wordpress.com/tag/windows-10-sysprep/

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/windows-could-not-complete-the-installation-to/bf09c3c5-298b-459f-aed5-4f431b8398f5?auth=1

No comments:

Post a Comment

Give my post a +1 or let me know if you found any of my blog content helpful!