Skip to content

Instantly share code, notes, and snippets.

@arman-hpp
Created December 10, 2016 04:01
Show Gist options
  • Save arman-hpp/6681330591f667257af3fdc3dd6d8e93 to your computer and use it in GitHub Desktop.
Save arman-hpp/6681330591f667257af3fdc3dd6d8e93 to your computer and use it in GitHub Desktop.
Change IP With CMD
@echo off
set /p id="Enter Branch Code: "
@echo Please wait...
netsh interface ipv4 set address name="VirtualBox Host-Only Network" static 192.168.%id%.8 255.255.255.0 192.168.%id%.1
netsh interface ipv4 set dns name="VirtualBox Host-Only Network" static 8.8.8.8 PRIMARY
netsh interface ipv4 add dns name="VirtualBox Host-Only Network" 4.2.2.4 index=2
@echo Current branch changed to %id% Successfully.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment