Instead of typing this in a command prompt one at a time:
wmic /node:ipaddress /user:administrator /password:mypassword bios get serialnumber
How can I run that against one entire subnet and output to a text document? Since I do this every couple months to verify our inventory of computers, I would assume there would be a much of easier way I could put this in a batch script instead of doing it manually.
Best Answer
You may put a list after
node:
node:ip1,ip2,ip3
, or use a filenode:@file
- so just put all your ip addresses into a file and then run:That assumes user/password is the same on all machines.