I need a script that does the following:
I have multiple machines that I want to change the ip addresses of periodically.
Example:
IP: 192.168.107.101
Gateway: 192.168.107.1
change to:
IP: 192.168.106.101
Gateway: 192.168.106.2
Basically, the 3rd octet of the IP and the 3rd and 4th octets of the subnet needs to be changed, and I would like to do this via a script that would change the 107 value to 106 for the IP and the subnet from "107.1" to "106.2" via a wildcard or something. Since this is just an example, I just need a wildcard of some sort to be able to change the 3rd and 4th octets of the IP address. Is this possible via the netsh command and a batch file?
I have multiple machines that I want to change the ip addresses of periodically.
Example:
IP: 192.168.107.101
Gateway: 192.168.107.1
change to:
IP: 192.168.106.101
Gateway: 192.168.106.2
Basically, the 3rd octet of the IP and the 3rd and 4th octets of the subnet needs to be changed, and I would like to do this via a script that would change the 107 value to 106 for the IP and the subnet from "107.1" to "106.2" via a wildcard or something. Since this is just an example, I just need a wildcard of some sort to be able to change the 3rd and 4th octets of the IP address. Is this possible via the netsh command and a batch file?