How it works...

As noted earlier, you use PrintUI.dll to set up a printer pool. You invoke this DLL by using the RunDLL32.exe console application. The DLL contains the functions that the printer management GUI dialog use to perform their actions. RunDLL32.exe enables you to use scripting to perform the necessary printer configuration operations.

In step 1 of the recipe, you add a second printer port. In this case, we are adding a second network port. You could use a parallel, serial, or USB port if that is appropriate in your environment. In most organisations, the print server is in a server room, with networked printers nearer to the users.

In step 2, you use PrintUI.DLL to set the SGCP1 printer to have two printer ports, thus creating a printer pool. In step 3, after you create the printer pool, you can view the results by using Get-Printer, which shows the following:

You can also look at the GUI entry for the printer on the print server, PSRV: