• Now's your chance win big! Join our community and get entered to win a RTX 2060 GPU, plus more! Join here.

    Meet Stan Dmitriev of SurrogateTV on the Pi Cast TODAY! The show is live August 11th at 2:30 pm ET (7:30 PM BST). Watch live right here!

    Professional PC modder Mike Petereyns joins Scharon on the Tom's Hardware Show live on Thursday, August 13th at 3:00 pm ET (8:00 PM BST). Click here!

Question changing your PC IP address using BAT file?

radwan3

Honorable
Aug 25, 2014
32
0
10,530
0
Hi everyone ...

anybody knows how to change IP address of my PC using a BAT file so that if I double click on the bat file it will set the PC IP address statically to some specific IP address ?

Im using a work laptop and since I am moving between office and home I have to do it manually everytime I come to the office where a static IP is assigned to my laptop while its automatic /dynamic in my home ...


thank you in advance.
 
Been a long time since I messed with this and maybe it is different now with the power shell stuff.

There was a command NETSH SET that let you change a lot of stuff including the IP addresses. I remember it was messy when there were lots of interfaces.
 

Ralston18

Titan
Moderator
There are a number of ways you can do that including, as mentioned, via PowerShell.

Likely that you will need two scripts: One "Home" and the other "Work". Execute the applicable script while 1) at home or 2) at work.

However, I must second @Wolfshadw - being a work laptop you must check with your IT Team.

You may not even have the necessary admin rights.....
 

ASK THE COMMUNITY

TRENDING THREADS