Share via

Enable/Disable Network interface via command line

Anonymous
2010-07-09T19:20:04+00:00

Hi guys,

Anybody here who could point me to a resource or a command line instruction to disable a network interface in Windows 7? Your help would be highly appreciated. Thanks in advance!

Em

Windows for home | Previous Windows versions | Devices and drivers

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

28 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-04-19T10:56:18+00:00

    There are three methods to restart a NIC:

    1. netsh
    2. wmic
    3. Powershell

    From Powershell 3.0 there the cmd -let : Restart- NetAdapter

    Details on: http://www.sysadmit.com/2016/04/windows-reiniciar-red.html

    0 comments No comments
  2. Anonymous
    2016-01-15T22:11:33+00:00

    would the index stay the same from a restart or reboot of the computer. I would like to try to make a .bat script to automate this because I have to reset the network adapter all the time.

    0 comments No comments
  3. Anonymous
    2015-11-20T14:49:02+00:00

    WORKED FOR ME IN WINDOWS 10

    wmic path win32_networkadapter where NetConnectionID="Wi-fI" call disable

    BUT I DONT KNOW HOW TO MAKE A BAT TO PUT IN A TASK SO AUTOMATICALLY AIRPLANE MODE IS DISABLED ON 2:30

    0 comments No comments
  4. Anonymous
    2015-08-23T20:14:43+00:00

    Thanks to RNoel, et. al. I was able to create a scheduled task in Win10Pro with highest privileges to toggle my LAN adapter on and off for the unmetered time window provided by my ISP.  Since my satellite modem is connected to my router, I couldn't set the LAN connection to metered (Win10 idiosyncrasy)  but I could use the wireless connection method of my router to show a metered connection. I had to invest in a wireless adapter for my desktop but that was a minimal expense. I first ran the wmic command from a admin level command window to determine the index values then created two simple batch files to be scheduled.

    0 comments No comments