I need to print different documents with different settings: some single-sided and others double-sided. However, Word and Excel seem to use the printer driver's settings from the print dialog instead of the duplex mode I configure with PowerShell. How can I reliably control the duplex setting for each print job?
3 Answers
The printer driver's settings may take precedence over values changed with Set-PrintConfiguration. Windows printing can have several layers of defaults—global printer defaults, per-user defaults, and settings for the current print session—and applications do not always resolve them the same way. Set-PrintConfiguration may also behave differently depending on the driver type, so the driver and application could be overriding the PowerShell setting.
Printing configuration varies substantially between manufacturers and driver models. If the application supplies its own print-ticket settings, those can override the printer's stored defaults. In practice, success often depends on installing the correct vendor or universal driver and inspecting the printer's supported PrintTicket features rather than relying only on Set-PrintConfiguration.
For drivers that support it, you can modify the printer's PrintTicket XML directly. Start by retrieving the configuration and parsing its XML, then locate the duplex feature and replace its value before applying it again. The exact feature names depend on the printer, but common values are `psk:OneSided`, `psk:TwoSidedLongEdge` for flip-over duplexing, and `psk:TwoSidedShortEdge` for flip-up duplexing. For example, you can replace `psk:OneSided` with `psk:TwoSidedShortEdge` and pass the updated XML to Set-PrintConfiguration. A compatible PCL6 v4 or universal driver may be required.

This worked reliably with my older HP printer, which used a PostScript driver. The newer Brother driver behaves differently: it ignores the PowerShell setting, and the Word COM interface does not expose an API for selecting duplex mode per print job.