Creating a printer pool

Windows allows you to create a printer pool, which is a printer with two or more print devices (that is, printer ports) available. Windows sends a given print job to any of the printers in the pool. This feature is useful in environments where users do a lot of printing and need the speed that additional printers can provide, without having to ask the user to choose a specific print device to use.

There are no PowerShell cmdlets to enable you to create a printer pool. Also, WMI does not provide a mechanism to create a printer pool. As with other recipes in this chapter, you make use of PrintUI.DLL and RunDLL32 to deploy a printer pool. This is another example of utilizing older console applications to achieve your objective.

Getting ready

Run this recipe on the PSRV print server. This recipe uses the printer and port you created in the Installing and sharing printers recipe.

How to do it...

  1. Add an additional port for the SalesPrinter1 printer:
    $P = 'SalesPP2'      # new port name
    Add-PrinterPort -Name $P -PrinterHostAddress 10.10.10.62
  2. Create the printer pool for SalesPrinter1:
    $P1='SalesPP'
    $P2='SalesPP2'
    rundll32.exe printui.dll,PrintUIEntry /Xs /n $p Portname $P1,$P2
  3. View the resulting details, which show both printer ports:
    $P = 'SalesPrinter1'
    Get-Printer $P | 
       Format-Table -Property Name, Type, DriverName, PortName

How it works…

In step 1, you added a new printer port (SalesPP2) to serve as a second printer port for the SalesPrinter1 printer. In step 2, you set the two printer ports for SalesPrinter1, thus creating the printer pool. These steps produced no output.

In step 3, you can see the result of the first two steps. Notice that the SalesPrinter1 printer now has two available printer ports, as can be seen here:

How it works…

There's more...

In creating a printer pool, it's important to ensure that all print devices in a pool are the same, or at least can use the same driver. For example, you can use HP drivers for many printers. Having identical models and matching drivers is preferable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.68.14