A no-nonsense PowerShell script to block or unblock all .exe files in a specified directory and its subdirectories using Windows Firewall rules. Built for sysadmins, pentesters, or power users who need control without the bloat.
⚠️ Note: I am not the original author of this script. I streamlined its execution and improved usability to make it faster and more accessible for practical use cases.
- 🔐 Block all
.exefiles (inbound and outbound) in a target directory. - ♻️ Remove all previously created firewall rules.
- 👀 List all
.exefiles recursively in a folder tree. - ✅ No third-party dependencies. Native PowerShell.
- 🖥️ Precompiled executables available (
.exe64-bit & 32-bit). - ⚡ Includes a
.batfile for quick execution.
- Windows OS with PowerShell.
- Administrator privileges (mandatory).
- Sane judgment — this can break stuff.
-
Run as Administrator
This script must be executed with elevated privileges. -
Start the script
Open PowerShell and execute:.\scripts\script.ps1
www.idragraphics.com - [email protected]
- Idra: @idragraphics (Discord), [email protected] (Email) - Code & UX Design