Windows Server 2003
1825950 Members
2924 Online
109690 Solutions
New Discussion

To set the IP from DHCP to Static in Windows using batch script

 
Raghu Chikkamenahalli
Frequent Advisor

To set the IP from DHCP to Static in Windows using batch script

Hi All,

I have a requirement, where in, the assigned DHCP address needs to be set as a Static IP address using a batch script.
For example:
ipconfig output shows.

Connection-specific DNS Suffix . : winpc
IP Address. . . : 10.10.10.20
Subnet Mask . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.10.1

I have done this activity on Linux platform. Since, I am very lame in windows programming, Could you please help me, how this achieve using windows batch programming.

Regards,
Raghu.

1 REPLY 1
Phil.Howell
Honored Contributor

Re: To set the IP from DHCP to Static in Windows using batch script

try the netsh command
http://support.microsoft.com/kb/242468
Phil