The Command:
C:\>WMIC /NODE:’Hostname' ComputerSystem Get Username,Name
The Results:
Name UserName
Hostname Domain\User.Name
The node can be the DNS name, or IP Address, also a list can be used as well.
I would have really liked to use this command to query thousands of nodes, however through experimentation the tool seemed to crash after 30 or 40 hosts.
I tried the /FAILFAST:ON and /FAILFAST:50 options with some improvements, but nothing solid.
Please comment if you have used this tool successfully for a large list of nodes.
Thanks!
I ended up using PSTools (PSLoggedOn) to collect the usernames instead of WMIC.
ReplyDeleteWhat command did you use with pstools ?
Delete