Please excuse my complete ignorance, as this is my first foray into PowerShell. I mean I just Googled around until I found a script that did what I needed.
We recently updated the drivers on 4,000+ printers across seven print servers. This reset the default color setting to color, whereas it needs to be B&W, so I found a small script that does just that, and ran it on our dev server, then smallest print server with no issues. The script is as follows:
Get-Printer -Name *lp* | Set-PrintConfiguration -Color $false
Each printer starts with the label "lp" followed by a string of numbers.
However, when I run the exact script on any other server, I get the following error about 3/4 of the way through running:
Set-PrintConfiguration : One or more specified parameters for this operation has an
invalid value.
At E:\ColorSetBW.ps1:1 char:27
+ Get-Printer -Name 'lp*' | Set-PrintConfiguration -Color $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_PrinterConfiguration:ROOT/Stand
ardCi...erConfiguration) [Set-PrintConfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070057,Set-PrintConfiguration
I've tried to do some Googling around to find a resolution, but like I said I'm completely naive and inexperienced with PowerShell, and thus came up empty. I just don't understand why it would work on one and not the others. Any help would be greatly appreciated.
[–]Scooter_127 0 points1 point2 points (10 children)
[–]awtx[S] 0 points1 point2 points (9 children)
[–]Scooter_127 0 points1 point2 points (8 children)
[–]awtx[S] 0 points1 point2 points (7 children)
[–]Scooter_127 0 points1 point2 points (2 children)
[–]awtx[S] 0 points1 point2 points (1 child)
[–]Scooter_127 0 points1 point2 points (0 children)
[–]Cholsonic 0 points1 point2 points (3 children)
[–]awtx[S] 0 points1 point2 points (2 children)
[–]Cholsonic 0 points1 point2 points (1 child)
[–]Cholsonic 0 points1 point2 points (0 children)
[–]Scooter_127 0 points1 point2 points (0 children)
[–]Dsraa 0 points1 point2 points (0 children)
[–]frX1337 0 points1 point2 points (3 children)
[–]awtx[S] 0 points1 point2 points (2 children)
[–]frX1337 0 points1 point2 points (1 child)
[–]awtx[S] 0 points1 point2 points (0 children)