Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I have created a script that can aid you in changing the IP address of a PC/workstation to either DHCP or to an IP.

 

as I am unable to upload any files (keeps coming up with a runtime error), here is the code. Input into notepad and save as a .bat file and run on the PC / laptop of your choice. The IP Ranges used are example IP Ranges, change them to fit the IP you wish to assign, the Subnet Mask, the Default Gateway, and the DNS

 

 

Code for changing wireless to DHCP

netsh interface ip set address name="Wireless Network Connection" static DHCP

netsh interface ip set dns "Wireless Network Connection" static DHCP

 

Code for changing wireless to IP

netsh interface ip set address name="Wireless Network Connection" static 10.29.25.27 255.255.255.0 10.29.25.1 1

netsh interface ip set dns "Wireless Network Connection" static 10.29.25.254

 

Code for changing LAN to DHCP

netsh interface ip set address name="Local Area Connection" static DHCP

netsh interface ip set dns "Local Area Connection" static DHCP

 

Code for changing LAN to IP

netsh interface ip set address name="Local Area Connection" static 10.29.25.27 255.255.255.0 10.29.25.1 1

netsh interface ip set dns "Local Area Connection" static 10.29.25.254

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...