A lightweight PowerShell utility that safely disables and restores WiFi connectivity while helping prevent common network recovery issues such as DHCP failures, missing gateways, DNS problems, and adapter initialization errors.
Windows networking issues are often solved using aggressive reset methods that can create additional problems.
WiFi Toggle Control System takes a safer approach by performing controlled WiFi adapter operations designed to restore connectivity without modifying the registry, removing adapters, or resetting the entire network stack.
- DHCP failure states (169.254.x.x APIPA addresses)
- Missing default gateway assignments
- DNS resolution failures
- Adapter initialization delays
- Virtual adapter conflicts (Hyper-V / VirtualBox)
- WiFi adapter re-binding issues
- Failed reconnect states after sleep or adapter resets
- Safe WiFi ON/OFF operations
- Controlled adapter enable/disable handling
- Clean adapter state transitions
- Optional DHCP renewal workflow
- Waits for adapter readiness
- Supports proper DHCP negotiation
- Helps avoid APIPA fallback addresses
- Restores network routing after reconnect
- No registry modifications
- No Winsock resets
- No adapter recreation
- No network stack resets
- No Hyper-V configuration changes
- Real-time console feedback
- Clear operation status messages
- Connectivity verification checks
- Simple execution flow
- Windows 10 or Windows 11
- PowerShell 5.1 or newer
- Administrator privileges
git clone https://github.com/tcdoverlord/WiFi-Toggle-Control-System.git
cd WiFi-Toggle-Control-SystemCreate a working directory:
C:\Update Code
Place the script inside:
wifi_switch.ps1
Open PowerShell as Administrator and navigate to the script directory:
cd "C:\Update Code".\wifi_switch.ps1 off- Resetting a stuck adapter
- Clearing failed connection states
- Troubleshooting DHCP issues
- Recovering from unstable WiFi behavior
- Testing network recovery procedures
.\wifi_switch.ps1 onThe script will:
- Enable the WiFi adapter
- Wait for adapter initialization
- Renew DHCP configuration
- Verify connectivity
- Confirm successful recovery
START
β
Execute ON/OFF Command
β
Modify Adapter State
β
Wait For Adapter Readiness
β
DHCP Renewal (ON Only)
β
Connectivity Verification
β
END
WiFi-Toggle-Control-System/
β
βββ LICENSE
βββ README.md
βββ wifi-toggle-control-system-demo.gif
βββ wifi_switch.ps1
- Administrator privileges are required.
- Designed specifically for WiFi adapter management.
- Custom adapter names may require minor script adjustments.
- Intended as a safer alternative to full network reset procedures.
- Avoid combining with aggressive network reset tools unless troubleshooting.
- VPN software may temporarily affect adapter recovery behavior.
- Only the selected WiFi adapter is modified.
- No permanent system changes are made.
This project was created to provide a reliable alternative to networking repair methods that commonly rely on:
- Full network stack resets
- Registry modifications
- Adapter removal and recreation
- Broad system-wide networking changes
Restore wireless connectivity safely, predictably, and with the smallest possible impact on the operating system.
TCDOverLord
GitHub: https://github.com/tcdoverlord
This project is licensed under the MIT License.
See the LICENSE file for details.
