Question

Locked

WMIC remote results incorrect?

By Noshmon ·
Hi,

I've recently been tasked to get a list of local printers connected to the computers where I work. There's somewhere in the region of 10 000 machines spread across two sites which obviously makes me cringe when I think of walking around everywhere that a machine could be found with a pen and paper.

My resolution was to write a script that will scan a machine and look for a local printer. The script is working OK, but the CMD command is showing incorrect data. The command I'm running is "wmic /node:[computername] path Win32_Printer get local". This works fine when I run it with the node as the machine I'm running the command in, but if I put the node as a remote machine it returns all the printers being local. I can confirm these results are incorrect as I've used a test machine.

I'm running Windows XP Professional SP3, and so are the client machines. I have also tested this in Windows 7 with the client running Windows 7 and a different client running XP Pro.

Can anyone shed some light as to why the results are incorrect?

Thanks in advance!
Noshmon


######## UPDATE ###########
Have tried running "wmic /node:[computername] path win32_printer get network" and it returns false, so it's not just saying "True" to local because both local and network bits are enabled.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Desktop Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums