I am trying to get a batch file to output some data to a CSV file. The command I have works perfectly in the command line but not when I copy it to a batch file. In the batch file, it just hangs and keeps looping.
Here is the command:
getmac /fo csv /nh >> C:\Users\ohje1001tech\Desktop\test.csv
What I am trying to do is run this script on all the new lab computers that we have and generate a list of mac addresses that we can use to reserve IPs in the DHCP server.
Ideally I would like the computer name as well but thats not really needed.