mtthompsons
asked on
Batch script to change DHCP to Static
Change ipaddress
I need help with a batch file that can switch from DHCP to static ipaddress
Ip/Subnet/Gateway
Preferred DNS and Alternative DNS
These 5 to be added and when the same batch file is run if already static make it DHCP (Automatically select)
I need help with a batch file that can switch from DHCP to static ipaddress
Ip/Subnet/Gateway
Preferred DNS and Alternative DNS
These 5 to be added and when the same batch file is run if already static make it DHCP (Automatically select)
ASKER
Thanks
I have Windows 7. Can i use the same?
I have Windows 7. Can i use the same?
It should, just try.
You can adapt the script (or use another one) for you to
- get the currently assigned IP address and subnetmask + gateway
- set the IP config to use a static config, re-using the former IP address, subnet mask and gateway.
I have some tools that can help with these goals...
- get the currently assigned IP address and subnetmask + gateway
- set the IP config to use a static config, re-using the former IP address, subnet mask and gateway.
I have some tools that can help with these goals...
ASKER
Qlemo sorry i missed seeing your batch script
I tried it and i got this on the screen. Also where can i enter the subnet
The following commands are available:
Commands in this context:
? - Displays a list of commands.
add - Adds a configuration entry to a table.
delete - Deletes a configuration entry from a table.
dump - Displays a configuration script.
help - Displays a list of commands.
install - Install the IP protocol.
reset - Reset the IP configurations.
set - Sets configuration information.
show - Displays information.
uninstall - Uninstall the IP protocol.
To view help for a command, type the command, followed by a space, and then
type ?.
Press any key to continue . . .
I tried it and i got this on the screen. Also where can i enter the subnet
The following commands are available:
Commands in this context:
? - Displays a list of commands.
add - Adds a configuration entry to a table.
delete - Deletes a configuration entry from a table.
dump - Displays a configuration script.
help - Displays a list of commands.
install - Install the IP protocol.
reset - Reset the IP configurations.
set - Sets configuration information.
show - Displays information.
uninstall - Uninstall the IP protocol.
To view help for a command, type the command, followed by a space, and then
type ?.
Press any key to continue . . .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window