This should do it:
netsh interface set interface name="Local Area Connection" admin=disabled
Subsitute the actual network connection name if it isn't Local Area Connection.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
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.
Answer accepted by question author
This should do it:
netsh interface set interface name="Local Area Connection" admin=disabled
Subsitute the actual network connection name if it isn't Local Area Connection.
There are three methods to restart a NIC:
From Powershell 3.0 there the cmd -let : Restart- NetAdapter
Details on: http://www.sysadmit.com/2016/04/windows-reiniciar-red.html
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.
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
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.