Wi-Fi Auto-Reconnect Watchdog for Tailscale
A lightweight PowerShell background watchdog designed to resolve a known Tailscale bug where routing gets corrupted, causing the internet connection to drop entirely even though the Wi-Fi adapter remains connected to the network.
This can easily be modified to disable/enable your LAN Adapter in order to re-establish internet connectivity over cable instead of Wi-Fi.
Features
Dynamic Profile Detection: Automatically tracks and uses your currently active Wi-Fi profile.
Sleep/Hibernate Awareness: Includes robust event handlers and guard windows to prevent false triggers while the system is asleep or waking up.
Registry Kill-Switch: Easily disable the watchdog remotely via a registry key without needing to hunt down running processes.
Silent Execution: Runs completely in the background without nagging command prompt windows.
Detailed Logging: Automatically generates and manages a wifi_watchdog.log file tracking all connection evaluations and retry attempts.
File Structure
Place all of the following files together inside a dedicated folder:
Wi-Fi Reconnector.ps1 — The core PowerShell script (contains the logic shown below).
Hidden Execution.vbs — A VBScript wrapper that runs the PowerShell script completely silently.
Stop Watchdog Script.bat — A batch helper to set the registry kill-switch and stop the script execution.
Installation & Setup
Create a folder named "Wi-Fi Auto-Reconnect for Tailscale" and place your script files inside.
Create a shortcut pointing directly to "Hidden Execution.vbs".
Rename the shortcut to "Wi-Fi Auto-Reconnect for Tailscale".
Press Win + R, type shell:startup, and drop the newly renamed shortcut into that Startup folder so it runs automatically on login.