Last active
July 26, 2025 12:26
-
-
Save st1vms/daba2508aeccd7dfb607ce1abd65fc55 to your computer and use it in GitHub Desktop.
Flush DNS Cache on Boot (Windows)
This file contains hidden or 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
Flush DNS Cache on Boot (Windows) |
This file contains hidden or 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
@echo off | |
set "pwshPath=C:\Program Files\PowerShell\7\pwsh.exe" | |
schtasks /create ^ | |
/tn "ipconfig-flushdns-on-boot" ^ | |
/tr "\"%pwshPath%\" -Command \"C:\Windows\System32\ipconfig.exe /flushdns\"" ^ | |
/sc onstart ^ | |
/RL highest ^ | |
/ru SYSTEM | |
@pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment