Created
March 22, 2020 19:42
-
-
Save Willshaw/d7b94025f5359e8c344aa10c07b8b37a to your computer and use it in GitHub Desktop.
Quick batch file to disable/enable network adapter (mine is often slow on Windows 10 after waking from sleep)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem save this file somewhere, then create shortcut like this | |
@rem C:\Windows\System32\cmd.exe /c "C:\path\to\fixnetwork.bat" | |
netsh interface show interface | |
@echo on | |
@rem Disable the adapter - make sure the quoted name matches your adapter name | |
netsh interface set interface "INSERT NETWORK ADAPTER NAME HERE" DISABLED | |
@rem Wait 2 seconds before re-enabling (again adapter names must be correct) | |
timeout /t 2 | |
netsh interface set interface "INSERT NETWORK ADAPTER NAME HERE" ENABLED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment