dbustamante
IS-IT--Management
I have the awesome task of changing all my computers IP address and PC names on my 200 PC network. Sounds easy enough with a batch right? What I have so far is just the IP changing part but i still have to go in there and manually set the IP what i want for it to do is find the IP address already assigned to the PC and ask what i want it to change to same goes for PC name BUT I cannot figure out how to change the PC name. Any Ideas?
Code:
netsh interface ip set address name="Local Area Connection" source=static addr=10.37.224.74 mask=255.255.224.0
netsh interface ip set address name="Local Area Connection" gateway=10.37.224.1 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=10.37.224.10
netsh interface ip add dns name = "Local Area Connection" addr = 10.151.2.52