Some time ago a customer of mine wanted to develop PowerShell scripts to manage printers in their clustered environment. They wanted to use WMI for that. The problem they found is that while they could list the printers on a stand-alone server by executing "get-wmi-object -class Win32_printer", they didn't get any result on a clustered print server.
After some research I found out that what they wanted to do on the cluster cannot be done with WMI. WMI is not cluster aware, so WMI classes like Win32_Printer won’t return anything specific for clusters.
Note there is nothing to fix on WMI. The cluster needs to expose itself via management layer which is missing at this point of time on Windows 7 / Server 2008 R2 and older OS.
I hope this helps.
Alex (Alejandro Campos Magencio)
Could you pls tell me exact what needs to be done on cluster. I am not getting the exact solution on this.
Microsoft (us) are the ones that should change the design of the cluster so it exposes itself to WMI, so we can use it. This is a limitation on Windows, so there is nothing for you to do on the cluster.
There is a class for clusters but we can collect the printer names only. This does not have required property like drivername, portname, location etc.
"Get-WMIObject -Class Win32_PerfFormattedData_Spooler_PrintQueue "