HOWTO: Disable or enable network adapter in Windows with WMIC


In today's article we will look at how to disable or enable the network adapter (network connection) in Windows in various ways.


1. Open a command prompt:

   - Open a command prompt as an administrator: one way is to enter cmd in the search bar and right-click on the result found, select "Run as administrator".

Open a command prompt

2. Type wmic nic get name, index:

   - Type wmic nic get name, index and press Enter. Opposite the name of the network adapter that you need to enable or disable is the index that you need to remember.

Open a command prompt

3. Disable the network adapter:

   - To disable the network adapter, use the command wmic path win32_networkadapter where index = 2 call disable (the number highlighted in red must be replaced with the index of the network adapter that you memorized in the second paragraph)

Open a command prompt

4. Enable the network adapter:

   - To enable the network adapter, use the
wmic path win32_networkadapter command where index = 2 call enable
(the number highlighted in red needs to be replaced with the index of the network adapter that you memorized in the second paragraph).

Open a command prompt

Also consider using Action1 to Disable or enable network adapter if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.

Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.


Other Relevant HOWTOs: