VMware Horizon – Setup Server 2016 RDS Template – Generalize Windows

Release date: April 15th 2019

Welcome to my VMware Horizon series. In this sub-session I will describe how I generalized my Windows 2016 Server for RDS

I’m now ready to Sysprep and create a mandatory profile. Before I sysprep my image, I need to disable Password Complexity Requirements on Windows Server.

From gpedit.msc I change the local policy setting

GeneralizeWindows-01

 

Now it’s time to sysprep the image. First, I will create an answer-file for sysprep, unattend.xlm. I have modified mine as follows. A sample file is attached at the end of this page.

GeneralizeWindows04

 

I copy unattend.xml to “C:\Windows\System32\Sysprep”

GeneralizeWindows05

 

From an administrative cmd-prompt, I start sysprepping by running this cmd: “c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /unattend:c:\windows\system32\sysprep\unattend.xml /reboot”

GeneralizeWindows-04

GeneralizeWindows-05

 

After sysprep is done and the server is restarted, we can verify that the server now has a typical “sysprep’ed” computername

GeneralizeWindows-06

 

Next, I will create a mandatory profile. In Windows Explorer, Right-click “This PC” and click Properties. From the Advanced-tab I click Settings under User Profiles.

GeneralizeWindows-07

 

Select Default Profile, Copy To…

GeneralizeWindows-08

 

Copy profile to “C:\Users\Mandatory.v6” and click “Change” to set permissions

GeneralizeWindows-09

 

Select the user group: “Authenticated Users”

GeneralizeWindows-10

 

Click OK

GeneralizeWindows-11

 

Back in the User Profile dialogue box, delete the Account Unknown-profile

GeneralizeWindows-12

GeneralizeWindows-13

 

Click OK to exit User Profiles windows

GeneralizeWindows-14

 

Back in Windows Explorer, I browse to C:\Users\Mandatory.v6 folder, choose view “Hidden Items” and deselect “Hide protected operating system files”

GeneralizeWindows-15

 

I rename the file ntuser.dat to ntuser.man

GeneralizeWindows-16

 

I delete all ntuser*.* files except ntuser.ini and ntuser.man

GeneralizeWindows-17

 

Lastly, I revert changes in the View Options I made above.

 

Unattend sample file: Unattend_xml

PS: Beware of formatting when doing copy/paste!

 

That concludes my session about how I generalized and prepared Windows in my template. My next logical step will be applications and agents, covered here: VMware Horizon – Setup 2016 RDS Template – Install Agents and applications

 

Recommended reading:

VMware Tech Zone: Creating an Optimized Windows Image for a VMware Horizon Virtual Desktop

 

VMware Horizon – Setup Server 2016 RDS Template

VMware Horizon planning, deployment etc.

Disclaimer: Every tips/tricks/posting I have published here, is tried and tested in different it-solutions. It is not guaranteed to work everywhere, but is meant as a tip for other users out there. Remember, Google is your friend and don’t be afraid to steal with pride! Feel free to comment below as needed.

%d bloggers like this: