Guest blog by Nigel Hickey, Infrastructure Administrator, National Specialty Alloys -- 2015 vExpert
There are a lot of exciting features in VMware Horizon 6. One of the coolest in my opinion is Location-Based Printing. It allows IT organizations to map VMware Horizon 6 desktops to the printer that is closest to the endpoint client device. For example, as a doctor moves from room to room in a hospital, each time the doctor prints a document, the print job is sent to the nearest printer.
This blog will go over the basics of creating and managing your group policy for Location-Based Printing, and enabling VMware's ThinPrint technology, as well as keeping best practices in mind during the process.
Why do I need Location-Based Printing?
This is a great question. One of the first things that you should be asking yourself is, do I really need Location-Based Printing? Within my VMware Horizon 6 deployment we began without using Location-Based Printing. All of the features that ThinPrint brought to the table along with users that had login scripts for mapping printers happened to be working just fine for most of our environment. We ended up implementing Location-Based Printing for a remote office that was having trouble with login scripts and printer mappings playing nice with each other. Location-Based Printing worked out so well for us that we now use this great feature for our Horizon 6 kiosk desktops that employees utilize for HR Enrollment & Wellness programs within the company.
Using Location-Based Printing Group Policies have helped cut down on user created errors with mapping printers as well as default printer's switching automatically for the user. If there is one more thing I can automate within my environment I'm all about learning how to do it and then using that process to my advantage.
Best Practice: This is where I will point out an important limitation to be aware of when using GPOs in AD. Active Directory, like most systems, has its limitations that we tend to forget about or may never run into depending on your organization size. AD limits the Group Policy Objects (GPOs) to 999 that you can apply to a user or computer account. This is not your total maximum GPOs allowed in your domain, but the max that a single user or computer would be able to process without having adverse performance effects on your domain. Keep this in mind when working in large environments where you could be building GPOs to manage thousands of printers for thousands of users. Review these limitations here: https://technet.microsoft.com/en-us/library/active-directory-maximum-limits-scalability
To begin using VMware Horizon 6 Location-Based Printing features you have to first be familiar with Active Directory Group Policies, and I assume if you're reading this post, you more than likely are. We will be working with the ADM template from VMware, importing that into your Active Directory and then making the needed edits or changes to fit your needs. We will also be registering the Location-Based Printing Group Policy DLL files required for allowing these features to function as expected.
Here is a brief listing of the items we will be touching during this process:
1.The VMware Horizon 6 ThinPrint DLL
2. An ADM template from the VMware Horizon 6 extras folder
3. Configuring the Active Directory GPO
All of these changes of course should happen on one of your Active Directory Domain Controllers.
Getting It To Work
Registering the VMware ThinPrint DLL should be 1st on the task list. The DLL called "TPVMGPoACmap.dll" is the file we are after. In Horizon 6.0.1 or later, both the 32-bit and 64-bit versions of TPVMGPoACmap.dll are available in a bundled .zip file called ‘VMware-Horizon-View-Extras-Bundle-x.x.x-yyyyyyy.zip’, where x.x.x is the version and yyyyyyy is the build number. You can find this file on the VMware Horizon 6 download site located here: http://www.vmware.com/go/downloadview. If you are running a Horizon version that is lower than 6.0.1 (5.0, 5.3, etc) then the file is included within the installation directory of your Horizon 6 Connection server in the following default location: install_directory\VMware\VMware View\Server\extras\GroupPolicyFiles\ThinPrint. Both the 32-bit and 64-bit versions of the file are located here. Please be sure to use the correct version as required by your environment.
To register the DLL complete the following steps that can also be found within the VMware Horizon 6 Documentation.
- Copy the "TPVMGPoACmap.dll" file to your Active Directory server.
- Use regsvr32 to register the DLL. (An example would be: regsvr32 "C:\TPVMGPoACmap.dll")
Next you will create a new Active Directory GPO or use a GPO that you feel is okay to make changes to.
Best Practice: It’s again important to be sure you are not over using GPOs within your domain as we need to mindful of the 999 GPO limitations I mentioned above. Another thing to keep in mind is that each GPO can add a few MB to your SYSVOL directory in AD and having a bloated SYSVOL directory can also cause replication performance issues within AD. If you have implemented DFS Replication within AD (DFS-R SYSVOL) with a Group Policy Central Store, this is not as big a deal as DFS Replication allows for a larger SYSVOL quota.
For the purpose of this post I made a new GPO specifically for Horizon 6 printing but this might not be best for your environment. This makes it easier for me to understand what that GPO’s job may be just by seeing its title. Once your GPO is created and saved, and the Horizon 6 DLL file TPVMGPoACmap.dll is registered you can move on to the next steps.
Configuring TP Auto Connect
Open the GPO and browse to Computer Configuration, then Policies, and then Software Settings to see the ThinPrint Auto Connect settings, also referred to as the Auto Connect Map. This is where you can begin to customize Location-Based printing options.
Select the Auto Connect Map by double clicking on it to open a table that is waiting to be Enabled and filled out. The table is very easy to work with, adding and removing columns with the included buttons on the interface. Add your first row then begin to fill out each field that you require. Devices can be redirected a few ways here. You can provide an IP address range, Client Name, Client MAC Address, or by an Active Directory User/Group name. In my example I am using an Active Directory Group (\\domain\group) of the team that will be getting their printer redirected via this policy.
Best Practice: Note that although you can use other great options like, Client Name, MAC Address, it is a Best Practice to stay away from those 1-to-1 mappings. Once again that can lead you into trouble with AD & GPO counts. As a Best Practice you should try to use AD Groups or IP Ranges when configuring TP Auto Connect entries.
Once you have found the AD Group to use, continue to fill out the table as needed. Be sure to leave in asterisk or star in the fields that allow for the variable of ‘any’ where you will not be placing specific detail. You will need to know the exact name of the printer as well as its printer driver name and IP Address. These names should be typed exactly as seen within the printer properties of each printer.
When you have filled out the Auto Connect Map table to the completion level of your liking, you may now click Apply & OK to close out the windows bringing you back to your Group Policy Management Editor window. Exit this window also so you can complete your last step. Click on the Organizational Unit (OU) that you want to link this new GPO to and choose “Link an Existing GPO…” and select your Location-Based Printing GPO we just edited, then click OK to save.
And there you have it; your GPO is configured and linked to your virtual desktop OU in Active Directory. Now when users login to a virtual desktop that resides within that OU, the policy for Location-Based Printing will apply and map the required printer(s) based on the settings you chose with the Auto Connect Map table. Good Luck and Happy Printing!
Nigel has worked in IT just shy of 17 years, starting in the trenches of Helpdesk & Desktop Support for firms like Suburban Propane & Intel. From there, he worked as an Active Directory Support Analyst for Pfizer, then as a Windows System Admin, and currently as Systems Engineer where he has designed & implemented a VMware View infrastructure as well as manages the Desktop Support team at National Specialty Alloys in Houston, TX. Nigel is a Leader of the Houston VMUG and an active member of both the VMware & Spiceworks communities. Be sure to visit him online at his blog; www.nigelhickey.com and follow him on Twitter where he goes by, @vCenterNerd.