WMI with printers routers and switches.
Posted on 2004-08-27
I've written a network discovery tool that will discover all of the available machiens on the network. The next step is for me to run through the list of available devices and query for as much information as possible. Now, I can query the windows machines no problem, but I'd also like to be able to get some information on our routers/printers. My understanding is that I should be able to do this with WMI, but I'm wondering if the connection/query methods are different? Our routers just received software updates and 80% of the printers we have are about 1 year old, so I'm guessing I should be able to pull SOMETHING back. Here's the line of code that I am using to determine the machine I should connect to:
ms = new ManagementScope("\\\\" + next_machine + "\\root\\cimv2", Connection);
My question is, has anyone successfully queried a router or printer (any network device that is not a windows machine) using WMI, and if so, do I setup the ManagementScope object differently? Is there anything else I should know? Thanks!