Change fixed IP to multiple devices
Budget: €30 – €250 EUR
I know how to change IP information with a command:
netsh interface ipv4 set address name="YOUR INTERFACE NAME" static IP_ADDRESS SUBNET_MASK GATEWAY
netsh interface ipv4 set dns name="YOUR INTERFACE NAME" static DNS_SERVER
But I must change IP information from multiple devices, and I would like to automatise this process with a script.
Details:
1. Manage this problem with a DHCP server is not an option.
2. All this information is currently fixed in each computer: IP address, subnet mask, gateway, primary dns and secondary dns.
3. Windows (7 and 10) with active directory environment. I have domain admin rights and remote connection to all my computers. All computers are under the same domain.
4. I should be able to launch remotely the script to all computers in the same location from a central server locate in that same location.
5. The script should change information from devices from IP .1 to .254
6. The network interface name is not the same in all the cases.
7. Some devices have multiples active network interfaces, but only network interface with fixed IP should be changed.
8. The fixed IP address should remain the same.
9. It only changes the last octet of:
9.1. Subnet Mask:
9.1.1. Example: 255.255.255.224 to 255.255.255.128
9.2. Gateway:
9.2.1. Example: 192.168.2.126 to 192.168.2.222
9.3. But it changes (subnet mask and gateway) according to their range:
9.3.1. Example: computers from .201 to .217:
9.3.1.1. Mask: 255.255.255.224
9.3.1.2. Gateway: 192.168.2.222
9.3.2. Example: computers from .81 to .95 and .106 to .123:
9.3.2.1. Mask: 255.255.255.128
9.3.2.2. Gateway: 192.168.2.126
10. The DNS (primary and secondary) should change for a new one in all the computers:
10.1. Example DNS1: 8.8.8.8 to 208.67.222.222
10.2. Example DNS2: 8.8.8.4 to 208.67.222.220
11. I should be able to use this script in a few more locations, those location have the same configuration, that’s why only the last octet of Subnet mask and Gateway should be changed.
Best regards,
netsh interface ipv4 set address name="YOUR INTERFACE NAME" static IP_ADDRESS SUBNET_MASK GATEWAY
netsh interface ipv4 set dns name="YOUR INTERFACE NAME" static DNS_SERVER
But I must change IP information from multiple devices, and I would like to automatise this process with a script.
Details:
1. Manage this problem with a DHCP server is not an option.
2. All this information is currently fixed in each computer: IP address, subnet mask, gateway, primary dns and secondary dns.
3. Windows (7 and 10) with active directory environment. I have domain admin rights and remote connection to all my computers. All computers are under the same domain.
4. I should be able to launch remotely the script to all computers in the same location from a central server locate in that same location.
5. The script should change information from devices from IP .1 to .254
6. The network interface name is not the same in all the cases.
7. Some devices have multiples active network interfaces, but only network interface with fixed IP should be changed.
8. The fixed IP address should remain the same.
9. It only changes the last octet of:
9.1. Subnet Mask:
9.1.1. Example: 255.255.255.224 to 255.255.255.128
9.2. Gateway:
9.2.1. Example: 192.168.2.126 to 192.168.2.222
9.3. But it changes (subnet mask and gateway) according to their range:
9.3.1. Example: computers from .201 to .217:
9.3.1.1. Mask: 255.255.255.224
9.3.1.2. Gateway: 192.168.2.222
9.3.2. Example: computers from .81 to .95 and .106 to .123:
9.3.2.1. Mask: 255.255.255.128
9.3.2.2. Gateway: 192.168.2.126
10. The DNS (primary and secondary) should change for a new one in all the computers:
10.1. Example DNS1: 8.8.8.8 to 208.67.222.222
10.2. Example DNS2: 8.8.8.4 to 208.67.222.220
11. I should be able to use this script in a few more locations, those location have the same configuration, that’s why only the last octet of Subnet mask and Gateway should be changed.
Best regards,