VMware Horizon – Setup Server 2012R2 RDS Template – Generalize Windows

Release date: March 11th 2019

Welcome to my VMware Horizon series. In this sub-session I will describe how I generalized my Windows 2012R2 Server 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

 

Since this is a 2012R2-server I need to add a registry entry for UseProfilePathExtensionVersion: “reg add “HKLM\System\CurrentControlSet\Services\ProfSvc\Parameters” /v UseProfilePathExtensionVersion /t REG_DWORD /d 1 /f”

GeneralizeWindows-03

 

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

 

Once my VM is restarted, I will create a mandatory profile. In Windows Explorer, Right-click “This PC” and click Properties.

GeneralizeWindows07

 

Next I select Advanced System Settings

GeneralizeWindows-06

 

I Click “Settings” under User Profiles

GeneralizeWindows09

 

Select Default Profile, Copy To…

GeneralizeWindows-08

 

Copy profile to “C:\Users\Mandatory.v4” 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-08

Click OK to exit User Profiles windows

 

Back in Windows Explorer, I browse to C:\Users\Mandatory.v4 folder, choose view “Hidden Items”

GeneralizeWindows-12

 

I rename the file ntuser.dat to ntuser.man

GeneralizeWindows-13

 

Next I choose to view protected operating system files from View Options

GeneralizeWindows19

 

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

GeneralizeWindows20

 

Delete Themes-files/Folders

GeneralizeWindows-14

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 2012R2 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 2012R2 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: