habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Easy Windows Script For Disable Enable Interface

44 sec read

Sometimes in managing servers, there are many events that we cannot predict. One of them is the Windows VPS server has a FREEZE interface. The interface has frozen. Windows server is still on, but can’t freeze interface. Can’t ping and can’t be accessed either.

Instead of rebooting the server as a whole, it’s better to stop and start the Windows interface.

Open CMD to execute command

At first, On Loop Icon Search, then type “cmd”. Right click and run as administrator.

Note: This action need for Administrator access permission.

Execute Command “netsh”

Here is simple command to disable and enable interface in Windows.

netsh interface set interface Ethernet disable && netsh interface set interface Ethernet enable
Windows Disable Enable Interface

Add Script in Task Scheduler Windows

Interface freeze can happen at any time. We can’t predict. Preventive that we can do is make a schedule in Windows for the execution of the script “netsh” above.

Open Task Scheduler.

Next, create Task. And give a name of scheduler. Change User or Group, and then select Administrator.

In tab trigger, make sure “enabled” is cheklist. We can set when script will be execute by scheduler.

Last, in tab condition. Select New, and browse file script that we made .bat extension that contained script above.

habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Easy Create Laravel Project with Composer

Requirement Laravel, a popular PHP framework, is renowned for its elegant syntax and robust features, making it a top choice for web developers. One...
habibzain
1 min read

Virtualbox Change Storage Size

Changing the storage size of a virtual machine in VirtualBox involves a few steps. Here’s a general guide. Backup your Virtual Machine (VM) Before...
habibzain
35 sec read

Easy Setup Logrotate Nginx Ubuntu

Log rotation is an important aspect of managing log files on a Linux system, including those generated by Nginx. Logrotate is a utility that...
habibzain
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox