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.
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.
Start elevated Command Prompt.
Get NIC list and index number:
wmic nic get name, index
Enable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call enable
Disable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call disable
Yes, you are right. We can also use these commands:
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call disable
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable
It's simple to just give network interface name. But the most important is that you must run as administrator.
Worked for me straight away on win7x32 Premium,I made 2 shortcuts for enable and disable.Perfect,thanx
It doesn't work on Win7.