force WMIC to query only local computer?

cyclone3d

[H]F Junkie
Joined
Aug 16, 2004
Messages
16,305
So I am trying to use WMIC to get a list of users in the Administrators group on a single computer that is joined to a domain.

The command is run locally, so no remote querying needed.

The problem is, if the computer is hooked up to the network, it just sits there forever and never returns anything.

If I unplug the network cable, and then run the command, the results come back immediately.

This happens with any command that starts with:

WMIC USERACCOUNT

I have verified this issue on multiple computers.

I then ran a command through powershell, and from what I can tell, it is doing a search over the network instead of just on the local computer.

Anybody know a way to force it to only do a search locally instead of over the network besides unplugging the network cable?
 
As an update to this, I ended up making a powershell script to get the information I needed.

This was for a report I was needing to run through Dell KACE.

I then one-lined the whole script and ran it via a Custom Inventory Rule.

Works like a charm.
 
Back
Top