Thoughts from the EPS Windows Server Performance Team
Useful Microsoft Blogs
Hello folks, Pankaj here to show you an interesting way to change the Print Monitors and Processors registry keys with a single PowerShell command. This command can be a timesaver if you have hundreds of 3rd party Print Processors and Monitors on your Print Server (s).
*NOTE* these commands only work on stand alone Print Servers and will not work on Clustered Servers
After you install PowerShell (comes preinstalled on Vista+) you can run these commands:
Command to change Print Processor of all Printers to “WinPrint” set-itemproperty -path 'HKLM:\system\currentcontrolset\control\print\printers\*' -name 'Print Processor' -value WinPrint
Command to change Print Monitor to “Blank”
For x64 Drivers set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-3\*' -name 'Monitor' -value $null
For x86 Drivers set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\*' -name 'Monitor' -value $null
Steps to Perform:
1) Open the PowerShell Command Window from the start menu
2) Type in the command and hit enter
3) Check the Print hive again and you will see that all the print processor and monitors have been changed
Location of Print Processors HKLM\System\CurrentControlSet\Control\Print\Printers
Location of Print Monitors(for x86 Drivers) HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\
Location of Print Monitors(for x64 Drivers) HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-3\
BONUS: To get a total number of installed printers via PowerShell, run this command:
(Get-WmiObject -class "Win32_Printer" -Namespace "root\cimv2").Count
Until next time, take care!
What’s new in Windows PowerShell 2.0 http://blogs.technet.com/b/askperf/archive/2010/01/26/what-s-new-in-windows-powershell-2-0.aspx
Please make sure to take a Backup before making any changes. :) :)
Thanks for the article
My first step in troubleshooting printing problems is to clean the print hive by doing these steps:
1) I check printinfo.html to see al 3rd party print processors and monitors
2) take a backup of the corresponding registries and delete all the 3rd party monitors and processors
3) change the print processor of all printers to winprint
Are the commands in this article equivalent to this. I mean, if I just change the processors to winprint and change the monitors to 0, will it still work if I don't delete them in the registry?
Even if I change all my processors to winprint when I install a new driver (HP) it seems to flip all the processors back to a HP processor. So it's probably good to remove all of them so you don't run into issues in the future.
Additional note I would put on here: The print settings will not reflect these changes until spooler is reset. Either stop spooler before making these changes, or reset spooler afterward to see the changes reflected in the settings.