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 - info@idragraphics.com
- Idra: @idragraphics (Discord), idra.arts@gmail.com (Email) - Code & UX Design