Bigdoggit
asked on
Need help on netsh script
I would like to have script files on my desktop I can double click and quickly change my network settings. However, the dns addresses are not taking. I will run the script and the ip address works great, but the dns will just change from dynamic to static, without entering addresses. Can anyone see what I am doing wrong? I attached my script file
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=static addr=192.168.1.5
mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0
set dns name="Local Area Connection" source=static addr=192.168.0.1
add dns name="Local Area Connection" addr=192.168.1.1
netsh int ip set wins name="Local Area Connection" source=static addr=none
# Interface IP Configuration for "Wireless Network Connection 2"
set address name="Wireless Network Connection 2" source=dhcp
set dns name="Wireless Network Connection 2" source=dhcp
set wins name="Wireless Network Connection 2" source=dhcp
popd
# End of interface IP configuration
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
::I forgot the enableDhcp.cmd ..
::
wmic nicconfig where description="Local Area Connection" call EnableDHCP