In this post I will go over how to re-purpose low-end PCs as "Thin Clients" for VMWare View. Essentially we need to replace the Windows shell so that users are only prompted to log in through the VMWare Horizon View Client and nothing else. With this comes additional challenges and caveats.
List of assumptions for this post:
To get started, you will need the following:
List of assumptions for this post:
- Understanding of Group Policy and Active Directory
- Understanding of SCCM 2012, specifically creating and deploying Packages and Images through Task Sequences.
- Basic understanding of scripting, mostly simple batches.
- Understanding of Horizon View, creating Pools based on snapshots and general syntax for installing and customizing the Client
- Basic understanding of the underlying functionality of Windows 7, registry, core components, and variants
To get started, you will need the following:
- Microsoft Windows ThinPC (aka Windows 7 Embedded). This will be available through the Microsoft Volume Licensing Site if you have Software Assurance with your Microsoft Agreement.
- Microsoft Security Compliance Manager
- Microsoft System Center Configuration Manager 2012 (SCCM 2012). You can figure out how to deploy your image utilizing another tool but for this post I will only be providing instructions for SCCM 2012.
- VMWare Horizon View setup with a Pool in place. This post assumes you know how to provision your pool for end-users
- VMWare Horizon View Client. You will need the latest x86 version as ThinPC is only 32-Bit.
- The JCOS Installation Files for replacing the Windows Shell.
- A reference machine for creating your image. I recommend firing up a Virtual Machine in Virtual PC, VMWare Workstation, or VirtualBox.
Prepare you reference machine:
- Create a Virtual Machine to boot from the ThinPC ISO. Complete the install.
- Install the SCCM Client.
- Install the View Client. I recommend doing this with a custom batch file that contains your server address and other information, otherwise you can customize this later via Group Policy.
- Copy the latest View Client Administrative Template for Group Policy to a network location. You will find it here: "C:\Program Files\VMware\VMware View\Client\extras\vdm_client.adm"
- Follow the steps on the JCOS site, run their script and then let it reboot the few times that it needs.
- At the end you should be looking at a black background with the Horizon View Client ready to login.
- Now capture your reference machine into an image using a Required client-based Capture Task Sequence.
- Import the image into SCCM and distribute the content as usual.
Group Policy and Client Customizations:
- Since the machines will be joined to the domain you can control much of the settings from a Computer-Based Group Policy Object (GPO).
- These are the general settings you'll want to apply to your Thin Clients. Create a new GPO and import the 'vdm_client.adm' we talked about earlier. Use these settings as a guidance:
- VMware View Client Configuration/Scripting definitions
- Connect USB devices to the desktop when they are plugged in (Enabled)
- Desktop Layout (Enabled - Full Screen)
- DesktopName to select (Enabled, enter in the name of the Pool you want the users to automatically log into)
- Logon DomainName (Enabled - NetBIOS of your Domain)
- Server URL (Enabled, View Client URL used to connect to Pools)
- VMware View Client Configuration/Security Settings
- Certificate verification mode (Enabled - No Security)
- Default value of the 'Log in as current user' checkbox (Disabled)
- Display option to Log in as current user (Disabled)
- Enable SSL encrypted framework channel (Enabled)
- Ignore certificate revocation problems (Enabled)
- You'll also want to disable the 'Shade' on the View Client Window that is enabled by default. This is a registry setting which can be applied during our Deploy Task Sequence as a Package.
- HKLM\SOFTWARE\VMware, Inc.\VMware VDM\Client
- REG_SZ Key: EnabledShade
- Value: 0
Microsoft Security Compliance Manager and LocalGPO Tool
- You'll notice that the machine is logging in by default using a local account which you cannot remotely manage using Group Policy. The problem arises in that some of the settings you want to manage are only available via a User-Based GPO and that will not work for a local account. You can either manage the local Group Policy settings on your reference machine prior to capturing it, or you can utilize the LocalGPO Tool within the Microsoft Security Compliance Manager and capture these local Group Policy settings and then apply them to your machines as a Task in your Deploy Task Sequence.
- Install Microsoft Security Compliance Manager (MSCM) on a reference machine.
- Navigate to where you installed MSCM and find the LGPO folder. Copy this to a network location, you'll need it and want to use it in the future.
- Fire up another ThinPC Virtual Machine and install the LocalGPO.msi found within the LGPO folder.
- Create a folder called 'GPBackups' at the root of C:
- After LocalGPO is installed, navigate to where it is installed. Here you will find a 'command-line here.cmd' file. Copy and paste this in the same folder and rename it 'ExportLocalGPO.bat.'
- Edit that file and modify it so it looks like the following:
- @Echo off
- ECHO.
- ECHO LocalGPO Tool
- ECHO ____________________
- ECHO.
- %~d0
- CD %~dp0
- cscript //H:CScript //B //NoLogo
- cscript LocalGPO.wsf /path:C:\GPBackups /export /GPOPack
- Now we need to modify the local Group Policy before we capture the settings.
- At the 'run command' type in 'gpedit.msc'
- Much of what you'll want to configure will be found under:
- User Config - Administrative Templates - System - Ctrl+Alt+Del Options
- Remove Change Password (Enabled)
- Remove Lock Computer (Enabled)
- Remove Task Manager (Enabled)
- Remove Logoff (Enabled)
- Feel free to configure any other User Configurations. Remember, the computer ones we can do over the network via a standard GPO applied to the targeted Organizational Unit.
- Now go back and run 'ExportLocalGPO.bat' (Run as Administrator).
- If everything completes successfully, go to C:\GPBackups and you should see a file with a long GUID name. Copy GPBackups to a network share in it's own folder.
- Within GPBackups on the network share, create a batch file called 'ImportGPOPack.bat'
- Here is the syntax on what to put into that batch file:
- cscript "%~dp0{GUID}\GPOPack.wsf" /Path:"%~dp0{GUID}" /silent
- This will apply those local GPO settings to a remote machine.
- Create a Package within SCCM. The Source Files should point to 'Network Share\GPBackups' and the command to run will be 'ImportGPOPack.bat'
- Test Deploying this Package to a machine prior to adding it to your Deploy Task Sequence.
Final Deploy Task Sequence
- Within the JCOS folder you downloaded, copy the 'sysprep.reg' file to a lone folder on a network share.
- Create another SCCM Package with the above folder as the source files and for the command line specify 'regedit /s sysprep.reg'
- Look at the settings within 'sysprep.reg' and then deploy the package and ensure it does what it is supposed to.
- Create a Deploy Task Sequence
- Specify the image as the one you originally captured
- Go through the standard list of tasks, including any Driver Packages you have set to apply to your specific machines.
- At the end of the Task Sequence, create another Task Sequence Group called 'Post ThinPC Settings'
- Add a Package and choose your 'ThinPC Sysprep Package'
- Add another Package and choose your 'ThinPC ImportGPOPack Package'
- Add another Package and choose your 'ThinPC Disable View Shade'
- Follow it all up with a 'Restart Computer' and specify booting to local OS, NOT WinPE as to avoid Client Provisioning issues.
- Deploy
- Test
- Test some more..
Reference Links:
- Backing up and restoring the Local GPO (There are some syntax errors in this link)
- Backup and restore the Local GPO (There are some sytax errors in this link)
- VMWare Horizon View 5.3 Client Install (See page 20 for details)
- How to Build a Thin Client on Existing Hardware