How to Replicate Print Drivers with PowerShell in XenApp 6.x

How to Replicate Print Drivers with PowerShell in XenApp 6.x

book

Article ID: CTX126125

calendar_today

Updated On:

Description

This article describes how to replicate print drivers using the XenApp PowerShell Cmdlets interface in XenApp 6.x.

Background

The XenApp Commands PowerShell interface of XenApp 6.x allows administrators to perform a variety of tasks in their XenApp environment. The replication of print drivers is one of the tasks. This is useful because the option to replicate drivers in the management console has been removed.


Instructions

Note: Replication might take several minutes to complete in a medium to large size environment.

Complete the following steps to replicate print drivers using the XenApp PowerShell Cmdlets interface in XenApp 6.x:

  1. From the source XenApp server, launch a PowerShell session as an administrator.

  2. Check the PowerShell window title bar to confirm that you are the Administrator.

  3. Ensure that all signed scripts are enabled to run.

  4. Type Get-ExecutionPolicy and press Enter to show the status of scripting.

  5. If the status returned was Restricted, type Set-ExecutionPolicy RemoteSigned and press Enter.

  6. An option to enable scripting in PowerShell is now available. Press Y and then press Enter. Other options are [N] [S] and [?].

  7. Type Add-PSSnapIn Citrix.* and press Enter to load the module.

  8. Type Get-XAPrinterDriver –Servername XASource where XASource is the name of the XenApp source server of the driver and press Enter.

  9. To view the full syntax of the cmdlet used for replication, type Get-Help Start-XAPrinterDriverReplication –Full and press Enter.

  10. After confirming which print driver to replicate, choose if you wish to manually replicate it or add it to the auto-replication list.

Note: These commands require the latest PowerShell SDK.

Manual Replication

  1. Type Start-XAPrinterDriverReplication and press Enter. PowerShell cmdlets are non-case-sensitive.

  2. PowerShell prompts for the DRIVERNAME. Input the exact driver name, without quotations, then press Enter to go to the next step.
    Note: Multiple drivers can be added for bulk replication; press Enter after each driver (this creates a list).

  3. Add drivers while finishing, press Enter again on a blank line to go to the next step.

  4. PowerShell prompts for the TARGETSERVERNAME. Input the exact server name, without quotations, then press Enter to go to the next step.
    Note: Multiple servers can be added for bulk replication; press Enter after each server (this creates a list).

  5. Add all servers, press Enter again on a blank line to go begin the replication. No output is generated, unless there is an error.

  6. Use the Get-XAPrinterDriver –Servername XASource cmdlet to verify that the replication was successful for each target server.
    User-added image

Auto-Replication List

  1. Run the cmdlet to add a print driver to the auto-replication list.

  2. Type Add-XAAutoReplicatedPrinterDriver–DriverName “<name of driver>” –SourceServerName XASource, where <name of driver> is the exact name of the print driver and XASource is the source server and press Enter.
    The output must confirm the driver name, source server, and that the driver need not be overwritten if it exists (the default). A similar output is received when running the Get-XAAutoReplicatedPrinterDriver cmdlet.

  3. Pause before typing Get-XAPrinterDriver –ServerName XADest, where XADest is the name of a XenApp server that did not originally contain the print driver that was just added to the replication list.

  4. Type Remove-XAAutoReplicatedPrinterDriver –DriverName “<name of driver>” –ServerName XASource, if you choose to remove a print driver from the auto-replication list, where <name of driver> is the exact name of the print driver and XASource is a source server.

Issue/Introduction

This article contains the procedure to Replicate Print Drivers with PowerShell in XenApp 6.x.

Additional Information

CTX125160 – Alternative Methods for Replicating Print Drivers and Settings in XenApp
CTX774641 - Printer Driver Replication Fails for Certain Printer Drivers
CTX137608 - DSCheck Maintenance Assistant
CTX103308 - FAQ: Using DSCHECK to Purge Print Driver Replications
Citrix Download - XA 6.5 PowerShell SDK