Run WMIC command across network

You may put a list after node: node:ip1,ip2,ip3, or use a file node:@file - so just put all your ip addresses into a file and then run:

wmic /node:@nodes.txt /user:administrator /password:mypassword /output:out.csv bios get serialnumber /format:csv

That assumes user/password is the same on all machines.


A for loop with a file redirection will work, although you might want to let it sit and run for a while if you have more holes in your node set (in otherwords, can't resolve the IP in the loop)

(FOR /L %s IN (1,1,254) DO wmic /node:192.96.1.%s /user:administrator /password:pass bios get serialnumber) >> c:\results.txt

If you plan to put this in a batch file, replace the %s with %%s. That is all.