PART 20 – Printing in Citrix XenApp 6.5

Printing is one of the most important topics in Citrix networks. In this lab, we will be working on printing configurations and policy settings to optimize printing functions in a Citrix XenApp farm.

When a user connects to the Citrix Farm, if the farm administrator permits, the users’ printers will be mapped to the Citrix Network so that local printing can be done, i.e., local printers are connected to the Citrix Server. The Citrix Server must have the driver and printer name exactly as the one present on the user’s computer for this to happen.

For this reason, suppose that each user has 10 printers, 1000 users connect to the Citrix farm will make 10,000 native printer objects floating on the server.

Citrix allows you to make changes to this behavior so that the farm is optimized by adding Printing Policies to control how printing is taking place.

For example:

You can choose to use Citrix Universal printer driver or Windows Native Printer Driver. If you use Citrix Universal Driver, you do not need to have all custom drivers installed on the server. This will result in an optimized Citrix network.

Below are some lab settings that you can practice to get familiar with how Citrix Printing works.

Default Behaviour.

On the Client computer (CLIENT.XALAB.LOCAL), open the Control Panel -> choose Devices and Printers. List all printer objects.

Go to XenApp via Web Interface, load NotePad.

Choose File / Print. We see that all the local printer objects are present on the server.

Exit Notepad.

On the XenApp Server, Launch PowerShell. Type:

Add-PSSnapin Citrix*

Get-XAPrinterDriver –ServerName XA65

We can see all printer drivers on the server.

Printer Persistent on Server

All printer objects are persistent on the server. Even though the client has disconnected from her session, the local printer object still lingers on the Citrix Server. We now show this behavior by doing the followings:

Go back to the client, add a new local Printer using the Control Panel.

Set it as the Default Printer.

On the client, log back into Notepad. Choose File / Print. We will see the newly added printer there.

Now we will check the server to verify that the printer is present on the server. Before doing this, close Notepad. On the XenApp server, type this in PowerShell:

Get-XAPrinterDriver –ServerName XA65

We will see the printer driver showing up there on the Citrix Server (may take up to 1 minute for this to show).

The printer shows as the second last line in the screenshot above.

Prevent Printer Mapping Policy

Launch Citrix AppCenter.

Drill down to XenApp. Expand the Farm, click Policies. Click on the User tab. You will see an Unfiltered policy. Click the Edit button.

Click Settings tab. Click Printing Section. Choose Client Printer Redirection.

Click Add. Choose Prohibited. Click OK twice to close all dialog boxes.

Verify: Launch Notepad on the client. Click File / Print. Now you can only see the printer objects from the server. Printer objects from the client are not connected. Specifically, the Lanier printer from the client is not connected to the server this time due to the prohibit we placed in the policy.

Allow only Default Printer to be connected

We were able to block all local printers from being connected to the server. Now let’s allow only the default printer to be connected. Go back to the Policy settings.

Click Printing tab, highlight Client Printers. Click Auto-create client printers.

Click Add. Change from Auto-create all client printers to Auto-create the client’s default printer only. This will allow only the default printer form client computer to be mapped instead of all printers to be mapped.

Click OK twice.

Also make sure that Client Printer redirection policy is enabled. This is because the above policy only works if Client Printer Redirection policy is enabled.

Also make sure that the Lanier LP131n PCL printer is the default printer on the Client’s PC.

Launch Notepad on the client. Choose File / Print, verify that only the default printer from the client is mapped.

Exit Notepad.

On the XenApp server, we could see that the default client printer was re-directed to the server.

Prevent Microsoft XPS Document Writer from being Connected

As every Microsoft OS has XPS Document Writer printer installed. We do not want this Microsoft XPS Document Writer printer to be connected to the server even if it is set as a default printer on the client machine.

On the client computer, change the default printer to Microsoft XPS Document Writer.

Launch Notepad. Choose File / Print. You will see that there are two XPS printer objects. One of them is from the server and one is from the client.

We want to prohibit the Microsoft XPS Document Driver from being mapped.

Exit Notepad.

Go back to the Policy.

Under Printing, Click the Client Printers tab. Highlight Printer driver mapping and compatibility.

Click Add…

Type the name as “Microsoft XPS*” and choose Do not create radio button. Click OK htree times to close the policy.

Go back to the client. Launch Notepad.

Now we can see that there is only one XPS Document Writer present. This one is from the server. The one from the client is not connected as desired.

Verify the number of printers from the Client by opening the Devices and Printers:

As you can see, even though the client has a Microsoft XPS Document Writer as the default printer, it is not mapped to the server because we have deployed a policy to prevent that from happening.

Prevent Installation of Driver on the Server. Force use of Universal Printer

On the local computer, add another random local printer. Set it as default.

Launch Notepad.

Click File / Print. You will see the newly added printer there.

Close Notepad.

Go back to the XenApp server, launch PowerShell.


Get-XAPrinterDriver –ServerName XA65

We will see that the driver for the new printer has been added on the server.

Go back to the policy.

Click Printing, Drivers. Choose Automatic installation of in-box printer drivers.

Click Add, choose Disable.

Click Universal print driver usage policy.

Click Add.

Choose Use Universal printing only if requested driver is unavailable.

Now add a printer on the local workstation. Set it as default. In this lab, I choose to add a Samsung CLP-350 Series PCL6.

Check Printing Preferences to see all available Preferences.

Launch Notepad. Click File / Print. Highlight the newly install printer.

Choose Preferences. You will see Citrix logo. This means that it is a Universal driver.

In PowerShell, check the driver

Get-XAPrinterDriver –ServerName XA65

You will not see the driver for Samsung listed. This is because the driver is Universal.

Network Printing

To demonstrate network printing, we will perform the following lab. On the DC server (Domain Controller), make sure we have a test printer added. In this lab, I added the HP Laser Jet P3004 PCL6.

Make sure that the printer is shared.

Ensure you see the printer from \\DC.

In AppCenter, under XenApp farm, drill down to Policies, click the User tab. You will see an Unfiltered policy already existed.

Click New to create a new Basic Policy.

Call it Toronto. Click Next.

Click Printing tab, Session Printer, click Add…

Click Add.

Add Printer UNC path as \\dc\HP LaserJet P3004 PCL6

Highlight the new printer, click Settings.

Click Paper tab, checkmark on Overrise paper size. Choose A4. Click OK.

Click OK to dismiss the Session Ptinters dialog box.

Click Next.

In the Filter settings, highlight Client IP address. Click Add.

Click Add, Add Client IP address as Select Mode = Allowed. Click OK.

Click Next.

Click Create to create the policy.

Change the priority to Higher. (It will be changed to #1).

Go back to launching Notepad.

Click File / Print. We will see the newly added Network printer available.

Exit Notepad.

Setup Replication of Printer Drivers

Go back to the XenApp server XA65

Get-XAPrinterDriver –ServerName XA65

Also on XA66

Get-XAPrinterDriver –ServerName XA66

Compare the printer listing result.

We can see that the printers are on the server XA65 may not be present on XA66. This is because printer drivers are stored on the server, not in the farm database.

Add-XAAutoReplicatedPrinterDriver “HP LaserJet 4500 PCL1″ –ServerName XA1

Wait for a new moment for the replication to go through.


Get-XAPrinterDriver –ServerName XA66

The new printer driver should be now replicated.