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.

Centos Failed Update Kernel

Today I did a kernel update on my server with Centos 7 OS. At the end of the update process, I found a kernel...
habibzain
1 min read

Easy Fix Missing mirrorlist http://mirrorlist.centos.org on CentOS 7

When running yum update or command that utilize the yum system, errors similar to the following are produced: If you’re encountering issues with the...
habibzain
1 min read

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

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