Saturday, April 30, 2016

Part 10: Working with Citrix XenApp 6.5 – Printer Configuration

Printing in Citrix is a pretty important feature if you ask me. After all, if the users are going to use Citrix for their applications, they need to be able to print from the application like they would normally do from an application that would be installed locally on their workstations.
Printing Environment Overview
  • Print Server
  • Printer Device
  • Printers
  • Printer Driver
  • Printer Job
  • Printer Queue
  • Print Spooler Service
  • Citrix Print Manager Service
In a somewhat of a decent size infrastructure we normally see print servers deployed. What are print servers? these are dedicated servers that have printer queues/drivers configured on them for users to connect and print their data. This configuration might not be the same for everyone, we could have users with locally attached printers, for example, an administrative assistant might have a printer dedicated to his or her job, so the printer might be connected by a USB or LPT connection to his or her PC. With Citrix, we’re able to use these printing devices to print the data whether the printers are locally attached or attached on the network.
Deploying Print Server Role
In this part, we’re going to deploy the printer server role on a Windows Server 2008 R2. The steps are pretty straight forward, we just need to launch server manager and select Print and Document Services
print2Click Next on the Intro page
print3Chose the Print Server role
print4Now, click Install which should get the printer server role installed
print5

Configuring Printing Policy
Now that we have the printer role installed, we should not configure at the very least a few printing policies. There are a couple of basic policies we can configure to get started, those are:
  • Client Printer Redirection – Alows or Prevents client printers to be mapped to a server when a user logs on to a session
  • Default Printer – Specifies how the client’s default printer is established in an ICA session
  • Wait for printers to be created (desktop) – Allows or prevents a delay in connecting to a session so that desktop printers can be auto-created
  • Auto-create client printers – Specifies which client printers are auto-created
  • Auto-create generic universal printer – Enables or disables auto-creation of the Citrix Universal Printer generic printing object for sessions with a UPD capable client
  • Client printer names – Selects the naming convention for auto-created client printers
  • Direct connections to print servers – Enables or disables direct connections from the host to a printer server for client printers hosted on an accessible network share
  • Printer driver mapping and compatibility – Lists driver substitution rules for auto-created client printers
  • Printer properties retention – Specifies whether and where to store printer properties
  • Retained and restored client printers – Enables or disables the retention and re-creation of client printers
  • Automatic installation of in-box printer drivers – Enables or disables automatic installation of printer drivers from the Windows in-box driver set or from driver packages which have been staged onto the host using “pnputil.exe /a”.
  • Universal driver preference – Specifies the order in which XenApp attempts to use Universal Printer drivers, beginning with the first entry in the list
  • Universal print driver usage – Specifies when to use universal printing
  • Universal printing preview preference – Specifies whether to use the print preview function for auto-created or generic universal printers
print6One important piece to keep in mind, is that the printer driver on the server and the driver used by the client device must match exactly, otherwise, printing will fail. Please refer to this Citrix KB article for more information.
Replicating Printer Drivers To Other Servers
Printer driver replication can be a common scenario where we have a large Citrix/Printing environment. Why would we use printer replication? Well, if we have a lot of printers to deploy, doing so on a server per server basis can prove to be a long, inefficient, and error-prone task, so it is for this reason, printer replication can greatly assist with such tasks.
Replicating printers is quite simple, once we installed the printer driver on the server, we’ll need to open powershell and run the replication command to replicate the printer across. For example, let’s say that we wanted to replicate a printer driver on server XenApp called HP Laserjet 4250 PCL6 on to server XenApp1
print7
In powershell, we’ll need to add the Citrix SnapIn with the following command:
print8
Next, let’s get a list of all the printer drivers that are currently installed on XenApp:
print9
If we check XenApp1 server to see if the HP LaserJet 4250 PCL6 printer driver exists, we can see that presently, it does not:
print10
So, now, we’ll need to replicate the printer HP LaserJet 4250 PCL6 over to XenApp1 server. The powershell command that we would run from XenApp server is:
Start-XAPrinterDriverReplication -DriverName "HP LaserJet 4250 PCL6" -TargetServerName XenApp1
print11Now we can see that the printer driver was successfully replicated over to XenApp1 server
print12We can also automate this process by using Auto-Replication Lists. By Adding the printer driver to the Auto Replication lists, we can have those drivers automatically replicated over to other print servers. To add the printer HP LaserJet 4250 PCL6 to the auto replication list, we can use the following command:
print13

No comments: