Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize batch processing of remote batch modification of computer IP settings

Shulou Source: shulou.com Published: 2022-06-03 08:20:38 11月15日 Update

This article mainly introduces how to achieve remote batch modification of computer IP settings batch processing, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

The remote change script for the network IP settings.

When the network rectification requires a large number of IP modifications, you can use this script to make changes (it does not take effect until the computer is restarted, you can continue to work), and then wait for the off time to modify the switch configuration, so that all computers can work with the new IP the next day.

The prerequisite is to know the domain administrator password or the local administrator password of all computers (the latter is troublesome), and the client computer is WIN2K or XP (the firewall opens port 135x139).

One command to modify in batches:

For / l% I in (2Power1254) do net use / / 192.168.0% I / user:admin@domain.com "password" & & setipconfig 192.168.0% I 10.0.0.0% I 255.255.255.0 10.0.0.1

The setipconfig.bat content is as follows:

The code is as follows:

@ echo off

Echo 4 | find "ECHO" > nul & & echo usage: setipconfig remoteip newip newsubnet newgateway & & goto: end

Sc / /% 1 query RemoteRegistry | find "RUNNING" | (sc / /% 1 config RemoteRegistry start= demand & & sc / /% 1 start RemoteRegistry)

: loop

Sc / /% 1 query RemoteRegistry | find "RUNNING" & & goto begin

Ping 127.0.0.1-n 3 > null

Goto loop

Goto end

: begin

For / f% I in ('reg query / /% 1/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Interfaces ^ | find "{"') do (

Reg query / /% 1amp%% I / v IPAddress | find "% 1" & & (

Reg add / /% 1amp%% I / v IPAddress / t REG_MULTI_SZ / d% 2 / f) & & (

Reg add / /% 1amp%% I / v SubnetMask / t REG_MULTI_SZ / d% 3 / f) & & (

Reg add / /% 1amp%% I / v DefaultGateway / t REG_MULTI_SZ / d% 4 / f)

: end

Thank you for reading this article carefully. I hope the article "how to realize batch processing of remote batch modification of computer IP settings" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Computer article password administrator network script work management switch code value interest content premise at the same time command customer time time more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno Shulou Tech Info macOS Linux