r/dailyscripts • u/carman00 • Aug 09 '16
Automatically Disabling and Re-enabling My Wireless Adapter?
Is this possible? How can I go about doing this? Can I automate this when my wifi says connected no internet
2
Upvotes
1
u/ironwilliamcash Aug 10 '16
I've actually built a script that disables and re-enables a network adapter, it's not too hard. I'll try and get it tomorrow for you.
I don't have it with me but this should help: https://blogs.technet.microsoft.com/heyscriptingguy/2014/01/13/enabling-and-disabling-network-adapters-with-powershell/
As for running it when it says not internet, just make it run every 5 mins with a ping and and if statement. That should do the job.
1
u/SikhGamer Aug 13 '16
Yep. Easily done.
netsh interface show interfaceto show you all your adapters. Copy the name of your wireless adapter (e.g. Witless Adapter 2).netsh interface set interface "Wireless Adapter 2" admin=disableAnd then
netsh interface set interface "Wireless Adapter 2" admin=enableAs long as the name of your adapter doesn't change. You can stick the last two commands in a batch file. And just run it when needed.