2

On our Server 2008 R2 Print server we have ~30 HP Printers (Some CM3530s, M4345s and CP3525s) and I have been asked to convert all the print double sided and, for the colour printers, greyscale. Is there a powershell script or cmd-line trickery or do I have to go through each printers settings and change it manually?

1
  • I've accecpted @JamesK's answer although if you had a massive amount of printers and the time to look I would suggest looking at the command line utilities in @jscotts answer (and if you do find anything, please post as an answer to this question).
    – tombull89
    Mar 10, 2011 at 16:16

7 Answers 7

1

Unfortunately from my experience I think there is no way to mass update multiple printer queue drivers. I would think that you need to go into each print queue and amend the driver settings individually.

2
  • Thanks @James, I was afraid that was going to be the answer. I'll hang on for a moment and see if anybody else can suggest anything.
    – tombull89
    Feb 23, 2011 at 9:50
  • no problem! I would be interested to see if anyone else a method to mass change drivers. I think the issue is depending on the model the HP drivers can be diverse with options and locations. (unless you use the upd)
    – JamesK
    Feb 23, 2011 at 10:16
2

Actually HP's new v5.6.0 of their "HP Universal PS" and "HP Universal PCL 6" print drivers comes with a utility called: "HP Driver Config Util" which allows you to modify the CFG file within the driver installation folder so that any queue that is changed to that driver gets the settings that you specify. You can lock the settings as well so that the users can't get make unnecessary changes.

Download

-John

1

Setprinter.exe can do it, at least for HP printer drivers.

http://windowsitpro.com/windows/jsi-tip-9675-setprinterexe-command-line-tool-set-configurations-or-states-local-or-remote-pr

1

Here is a copy of a PS script that uses the set printer command to change the Color to BW:

$TargetHost = "printservernamehere"
$list = get-wmiobject -ComputerName $TargetHost -class win32_printer
$i = 1

Foreach ($printer in $list) {
    $name = $printer.name
    Write-host("Working on " + $name + " (#" + $i++ + " of " + $list.Count + ")")
    setprinter \\$TargetHost\$name 8 "pdevmode=dmcolor=1"
}
0

The first place I would look is in:

HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers

This is where you will find individualised configuration information for every queue installed on the machine. Each key will contain at least these three subkeys:

DsDriver

DsSpooler

PrinterDriverData

The first and third are what you want to have a look at. Some drivers will cache a lot of model-specific information in here to save time and use less network resources.

However, I think the feature-specific settings that you get to from "Printing Defaults" are controlled at a driver level. Most printers use SNMP to automatically get/set this information, however. You might also find registry entries scattered around the registry that have cached information that's useful here.

Good luck!

0

The answer from Dawne didn't work. The command is also not setprinter, and any references show "Set-Printer". It seems like it'd be better to edit the registry at that point.

https://technet.microsoft.com/en-us/library/hh918361(v=wps.630).aspx (Set-PrintConfiguration) https://technet.microsoft.com/en-us/library/hh918366(v=wps.630).aspx (Set-Printer)

I had no luck with Set-Printer, but got closer with Set-PrintConfiguration.

       #Set object to desired printer's print config
    $PrintConfiguration = Get-PrintConfiguration –PrinterName "Printer Name Here"
       #Set color to false
    $PrintConfiguration.Color = $false
       #Apply the changes
    Set-PrintConfiguration –InputObject $PrintConfiguration

You can use part of Dawne's answer to get a list of printers, and then loop through (to programmatically enter the printer's name). Name will be under property Name.

$PrinterList = get-wmiobject -ComputerName $TargetHost -class win32_printer

The problem with this approach is that it disables color all together, from what I can gather. It also did not work for my PCL driver, only PS. Checking printer properties/preferences will still show a default value of Auto Color (aka disabling color won't reflect). At the very least, if you want to prevent users from printing color, this could help.

0

setprinter.exe is available to download https://setuserprinter.sourceforge.net/ and can be used to do this type of configuration. I have been using it for years to deploy printers to remote servers and set driver settings like default paper tray. Works well, the caveat is that it needs to be installed on the machine or server that you will be using it on.

Dawne's post appears to be correct in their usage but settings will vary based upon print driver and manufacturer. Using the setprinter.exe -show [printer name] [level](where level is a value from 0-9) will display the current settings. I recommend displaying the settings, making the change and then comparing the settings to see if that setting is stored this way. Some printers use registry or config files to store their settings and will not display information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .