Set-PrintConfiguration functions

With Set-PrintConfiguration I see that it's easy to configure duplex, color, and other features.  I did not see a setting for controlling page banner however.  Does Set-PrintConfiguration, or another function allow disabling page banners for print queues?

There is a "PrintTicketXml" argument, but the online help doesn't describe how to make/generate a properly formatted XML file for this, and I could not find anything online.  If there is the ability to export the configuration of a queue to XML, and then import to other printers using this, then I would be very interested in knowing how to do this.

 

Ultimately, I have hundreds of sites, with over a thousand print queues globally and would like to set Duplexing on, greyscale on, and disable the banner sheet.  I think the following is what I need, but just with the banner sheet needing to be disabled somehow:

Set-PrintConfiguration -ComputerName <SERVER> -PrinterName <QUEUENAME> -DuplexingMode TwoSidedLongEdge -Color $false

August 15th, 2013 11:52am

Any thoughts on this?  I'm sure someone out there has a better way to set options on print queues better than doing it manually.
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2013 10:08pm

PrintTicketXML is a property of the MSFT_PrinterConfiguration WMI class.  If you call Get-PrinterConfiguration, you can access it there.

As for the content of that field, I think it's from from this printer schema reference:  http://msdn.microsoft.com/en-us/windows/hardware/gg463387 .  Section 7.1 is all about banner sheets.

August 22nd, 2013 11:46pm

PrintTicketXML is a property of the MSFT_PrinterConfiguration WMI class.  If you call Get-PrinterConfiguration, you can access it there.

As for the content of that field, I think it's from from this printer schema reference:  http://msdn.microsoft.com/en-us/windows/hardware/gg463387 .  Section 7.1 is all about banner sheets.

Thanks David.  I've started looking through that document (pretty large).  I see there are sections for Duplexing, banner sheets, etc.  There is even an example near the end.  Do you know if a PrintTicket from one model device is compatible with another model device?  All are Xerox in our environment, but some models may support color while others do not.  If I make or use a PrintTicketXML file that defines color, would it cause any corruption or issues if it gets applied to a device that is B/W only?  I'm assuming PrintCapabilities is specific to a printer model, while PrintTicket is linked to the driver.  But that's just a guess at this point.

I have done one test so far with the following code:

$XeroxPrinter = Get-PrintConfiguration -ComputerName <Server> -PrinterName <Name>

Set-PrintConfiguration -ComputerName <Server> -PrinterName <Name> -PrintTicketXml $XeroxPrinter.PrintTicketXML

It seems to be able to match up banner sheets, 2-sided printing, color, and most things under the "Printing Defaults" dialog from the source print queue to the destination, but nothing else (like "Print spooled documents first" which is outside of that dialog, which is fine).
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2013 1:10pm

Sorry, the PrintTicket stuff is all new to me, too.  My company is still mostly running Windows 2008, and I've handled printer configuration by using commands like:

rundll32 printui.dll,PrintUIEntry /Sr /n "Printer Name" /a "%cd%\settings.dat" g u

(where settings.dat is a file I've previously saved with the /Ss switch).

The PrintConfigurationXml and PrintTicketXml functionality appears to be a more modern and user-friendly version of this, instead of using binary .dat files and the old DEVMODE struct.  I'm just not sure of the answer to questions like "Can you use the same PrintTicket on different models?".

August 23rd, 2013 1:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics