%3CLINGO-SUB%20id%3D%22lingo-sub-374975%22%20slang%3D%22en-US%22%3ETwo%20Minute%20Drill%3A%20Change%20Print%20Monitors%2FProcessors%20via%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-374975%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TECHNET%20on%20Oct%2004%2C%202011%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EHello%20folks%2C%20Pankaj%20here%20to%20show%20you%20an%20interesting%20way%20to%20change%20the%20Print%20Monitors%20and%20Processors%20registry%20keys%20with%20a%20single%20PowerShell%20command.%26nbsp%3B%20This%20command%20can%20be%20a%20timesaver%20if%20you%20have%20hundreds%20of%203rd%20party%20Print%20Processors%20and%20Monitors%20on%20your%20Print%20Server%20(s).%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CEM%3E%20%3CSTRONG%3E*NOTE*%20%3C%2FSTRONG%3E%20these%20commands%20only%20work%20on%20stand%20alone%20Print%20Servers%20and%20will%20not%20work%20on%20Clustered%20Servers%20%3C%2FEM%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAfter%20you%20install%20PowerShell%20(comes%20preinstalled%20on%20Vista%2B)%20you%20can%20run%20these%20commands%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ECommand%20to%20change%20Print%20Processor%20of%20all%20Printers%20to%20%E2%80%9CWinPrint%E2%80%9D%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20set-itemproperty%20-path%20'HKLM%3A%5Csystem%5Ccurrentcontrolset%5Ccontrol%5Cprint%5Cprinters%5C*'%20-name%20'Print%20Processor'%20-value%20WinPrint%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3E%20Command%20to%20change%20Print%20Monitor%20to%20%E2%80%9CBlank%E2%80%9D%20%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3EFor%20x64%20Drivers%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20set-itemproperty%20-path%20'HKLM%3A%5CSYSTEM%5CCurrentControlSet%5CControl%5CPrint%5CEnvironments%5CWindows%20x64%5CDrivers%5CVersion-3%5C*'%20-name%20'Monitor'%20-value%20%24null%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3EFor%20x86%20Drivers%20%3CBR%20%2F%3E%20%3C%2FSTRONG%3E%20set-itemproperty%20-path%20'HKLM%3A%5CSYSTEM%5CCurrentControlSet%5CControl%5CPrint%5CEnvironments%5CWindows%20NT%20x86%5CDrivers%5CVersion-3%5C*'%20-name%20'Monitor'%20-value%20%24null%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ESteps%20to%20Perform%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E1)%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Open%20the%20PowerShell%20Command%20Window%20from%20the%20start%20menu%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F92883iF8D662B81F8F9A1E%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E2)%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Type%20in%20the%20command%20and%20hit%20enter%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F92884i0365A5B8D68FA9E1%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E3)%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Check%20the%20Print%20hive%20again%20and%20you%20will%20see%20that%20all%20the%20print%20processor%20and%20monitors%20have%20been%20changed%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ELocation%20of%20Print%20Processors%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20HKLM%5CSystem%5CCurrentControlSet%5CControl%5CPrint%5CPrinters%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ELocation%20of%20Print%20Monitors(for%20x86%20Drivers)%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20HKLM%5CSYSTEM%5CCurrentControlSet%5CControl%5CPrint%5CEnvironments%5CWindows%20NT%20x86%5CDrivers%5CVersion-3%5C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ELocation%20of%20Print%20Monitors(for%20x64%20Drivers)%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20HKLM%5CSYSTEM%5CCurrentControlSet%5CControl%5CPrint%5CEnvironments%5CWindows%20x64%5CDrivers%5CVersion-3%5C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3EBONUS%3A%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20To%20get%20a%20total%20number%20of%20installed%20printers%20via%20PowerShell%2C%20run%20this%20command%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E(Get-WmiObject%20-class%20%22Win32_Printer%22%20-Namespace%20%22root%5Ccimv2%22).Count%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EUntil%20next%20time%2C%20take%20care!%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3E%20Additional%20Resources%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhat%E2%80%99s%20new%20in%20Windows%20PowerShell%202.0%20%3CBR%20%2F%3E%20%3CA%20href%3D%22http%3A%2F%2Fblogs.technet.com%2Fb%2Faskperf%2Farchive%2F2010%2F01%2F26%2Fwhat-s-new-in-windows-powershell-2-0.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20http%3A%2F%2Fblogs.technet.com%2Fb%2Faskperf%2Farchive%2F2010%2F01%2F26%2Fwhat-s-new-in-windows-powershell-2-0.aspx%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-Pankaj%20Pande%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-374975%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Oct%2004%2C%202011%20Hello%20folks%2C%20Pankaj%20here%20to%20show%20you%20an%20interesting%20way%20to%20change%20the%20Print%20Monitors%20and%20Processors%20registry%20keys%20with%20a%20single%20PowerShell%20command.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-374975%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPrinting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on TECHNET on Oct 04, 2011

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!


Additional Resources:


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...


-Pankaj Pande