Skip to content

Instantly share code, notes, and snippets.

@martinusso
Last active April 16, 2019 05:52
Show Gist options
  • Save martinusso/6435828 to your computer and use it in GitHub Desktop.
Save martinusso/6435828 to your computer and use it in GitHub Desktop.
Configuring ip on Windows with command line. The requested operation requires elevation (Run as Administrator)
netsh interface ip set address name="CONNECTION_NAME" dhcp
netsh interface ip set dns name="CONNECTION_NAME" 8.8.8.8
netsh interface ip set dns name="CONNECTION_NAME" 8.8.4.4
netsh interface ip set address name="Wi-Fi" static 192.168.0.999 255.255.255.0 192.168.0.999 1
netsh interface ip add dns name="Wi-Fi" 8.8.8.8
netsh interface ip add dns name="Wi-Fi" 8.8.4.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment