How to disable or enable network via command line in Windows

It is  easy to make disable or enable network connection with GUI in Windows. But if you want or need to use the command line (DOS) it is also not difficult.

To disable or enable network interface in Windows via command line (command prompt) :
Run the Command prompt as Administrator

Write this command to disable the network:
netsh interface set interface name="Ethernet" admin=disabled



Change the label/name Ethernet with your network interface name. (it is usually named : Ethernet or Local Area Connection if you don't customize the name. (See at the network connection).



To enable the network, change the  admin=enable :
netsh interface set interface name="Ethernet" admin=enable



Change the label/name Ethernet with your network interface name. (it is usually named:  Ethernet or Local Area Connection if you don't customize the name. (See at the network connection).
How to disable or enable network via command line in Windows How to disable or enable network via command line in Windows Reviewed by raka on 7:14:00 AM Rating: 5
Powered by Blogger.