I would like to build a script which I would like to run on a computer which would firstly somehow extract a computers physical (Mac) Address from the NIC and use that value (00-22-64-75-90-BB --> 00226475BB) to update the Computers name.
I think that firstly a command like ipconfig /all will be run and the Physical Address that it displays must be put in an environment variable or piped to a text file. (Only the address itself without the "-" between each two characters.) After this value (00226475BB) is available it must be updated to the necessary fields or registry values to change the computer name.
Overview of expected solution:
1) Get Physical (Mac) Address and set value to environment variable or pipe value to text file.
2) Remove "-" from the environment variable or text file
3) Enter the value into the necessary environment variables or registry. (i dunno where?)
I need this script because I'm ghosting a bunch of computers and would like each of them to be uniquely identified by their Physical (Mac) Address. If somebody can help me with this I will look for a beggar and give him some money (200Eth Birr(20USD)). The person helping me would therefore help some poor bloke in Ethiopia. (I'm working in Addis Abeba) Any help will be greatly appreciated!
PS.I know that it's probably not the best place to say that Expert Exchange have helped me with plenty of solutions over the years and this is the first time that I actually had to ask an unasked question. I would like to thank all the Guys and Gals that have solved so many of my problems.