Set IP setting for any Network Card from Command Line |
|
Posted Wednesday, 06 June 2007 by Misha Hanin
Recently, one my client has put a task, to install one Windows server, to set up all and to prepare system for cloning. Also it was required, that on all servers would be static IP addresses. Equally, it's a not so complicated, but we have only one small problem. At cloning, on different servers Windows set different a name for network cards, once Local Area Connection, once Local Area Connection 2, sometimes Local Area Connection 5 and so on. As you understand, it makes a certain inconvenience at automation of process. To solve the given problem I’ve created a script, Set-IP.bat. At start Set-IP.bat will ask what IP Address, Subnet Mask and Default Gateway to define on a network card of the given server. I wish to pay your attention that the script itself will determine a name of a network card and will rename on necessary to you, in my case I renamed it to Production Network 1. Before the Sysprep, I have created directory C:\Scripts and have put down there Set-IP.bat.
created a Key SET-IP in format REG_SZ with value C:\Scripts\SET-IP.bat
The End! :)
|