Disable or enable network using Command line in Windows

Using command line / command prompt to disable or enable network interface in Windows :

• Run Command line as Administrator

• Command to disable the network:
netsh interface set interface name="Ethernet" admin=disabled
Change the label Ethernet with the label/name of your network interface,



• Command to enable the network:
netsh interface set interface name="Ethernet" admin=enabled
Change the label Ethernet with the label/name of your network interface,





The label/name of network interface is what you can see in the network connection page.
The label usually Ethernet or Local Area Connection if not yet be changed.