Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch to change IP and PC name HELP! 1

Status
Not open for further replies.

dbustamante

IS-IT--Management
Jul 12, 2010
63
US
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
 
Use NETDOM to change the name of a host from a command line
 
Thanks for Tip NETDOM is pretty quick and easy to use thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top