Get the App
SLTechnology News&Howtos  ›  Servers  › 

Change Windows boot to IP scheduled task

Shulou Source: shulou.com Published: 2022-06-02 16:27:22 09月22日 Update

Boot to IP can be used for computer room migration and other requirements. According to the need, you can make the server shut down at a specified time, then move to a new location, and IP is automatically set after boot.

Take the Win2008R2 system as an example:

Set up IP scripts: this example uses static IP scripts

Static IP (satic.bat)

Netsh interface ip set address name= "source=static addr=192.168.2.57 mask=255.255.255.0 gateway=192.168.2.1 1netsh interface ip set dns name=" source=static addr=192.168.2.57 mask=255.255.255.0 gateway=192.168.2.1 1netsh interface ip set dns name= "Local connection" source=static addr=114.114.114.114

DHCP gets IP (dhcp.bat)

Netsh interface ip set address name= "source=dhcpnetsh interface ip set dns name=" source=dhcpnetsh interface ip set dns name= "Local connection" source=dhcp

Use the console to add scripts to scheduled tasks

Change the IP planning task

Schedule tasks at a specified time of shutdown

Test change IP successful

Tags: Tasks scripts time static success location console server computer room systems requirements control services testing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Huawei macOS Redmi OPPO Reno