# A second AdGuard Home that keeps DNS working when the first one dies # https://www.zadran.net/guides/second-adguard-home-that-stays-in-sync # Generated from the guide, last updated 2026-10-13. # # NO WARRANTY. This script is provided as is. You are responsible for # understanding what it does before running it, and for the consequences. # Take a backup first. See https://www.zadran.net/disclaimer # # Destructive steps are left commented out on purpose -- uncomment them # only once you have understood what they do. # # If Windows will not run this file: a script saved from a browser is # marked as downloaded, and the RemoteSigned policy (the Windows Server # default) refuses it until you run Unblock-File .\second-adguard-home-that-stays-in-sync.ps1 # Where the policy is Restricted (the Windows 10 and 11 default), run it as # powershell -ExecutionPolicy Bypass -File .\second-adguard-home-that-stays-in-sync.ps1 # # These are the guide's PowerShell commands. Its bash commands are in # https://www.zadran.net/guides/second-adguard-home-that-stays-in-sync/script.sh $ErrorActionPreference = 'Stop' # ---- Set these for your environment ---- # The one you already run and configure $AG1_IP = '192.168.1.6' # A free IP on your network $AG2_IP = '192.168.1.30' # Only if you run a Windows domain $AD_DOMAIN = 'example.local' Set-DnsServerForwarder -ComputerName dc.$AD_DOMAIN -IPAddress $AG1_IP,$AG2_IP