Question: You want to set all of your printers with a name like HP to print duplex. How can you do this using Windows PowerShell?
Answer: On Windows 8 or above, use the Get-Printer function to retrieve all HP printers, and pipeline the results to Set-PrintConfiguration. Specify a duplex mode for the printer. This appears here.
Get-Printer -Name *hp* | Set-PrintConfiguration -DuplexingMode TwoSidedLongEdge
Ed Wilson is the bestselling author of eight books about Windows Scripting, including Windows PowerShell 3.0 Step by Step, and Windows PowerShell 3.0 First Steps. He writes a daily blog about Windows PowerShell call Hey, Scripting Guy! that is hosted on the Microsoft TechNet Script Center; for more PowerTips check out the Hey, Scripting Guy! blog.