Skip to content

Instantly share code, notes, and snippets.

@raresteak
Created August 22, 2024 12:01
Show Gist options
  • Save raresteak/2eb85bb8779b7e1ab2ba19c6fc3702e9 to your computer and use it in GitHub Desktop.
Save raresteak/2eb85bb8779b7e1ab2ba19c6fc3702e9 to your computer and use it in GitHub Desktop.
Manually setting IP information in Windows

Get name of adapter

netsh interface ipv4 show config

Set static IP

Change name= to name of interface found above

netsh interface ipv4 set address name=Ethernet static 10.10.10.10 255.0.0.0 [optional IP of default gateway]
netsh interface ipv4 show config

Set DNS

netsh interface ipv4 set dns name=Ethernet static 10.10.10.1
netsh interface ipv4 show config

Set DHCP IP

Change name= to name of interface found above

netsh interface ipv4 set address name=Ethernet source=dhcp
netsh interface ipv4 show config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment