BlockFolderWindowsFirewall

1.0.2

This script provides functionalities to manage (block/unblock) executables (EXEs) in specified directories via Windows Firewall. The operation can be targeted at individual directories or recursively applied to subdirectories as well.

By default, both Inbound and Outbound connections will be affected, but the scope can be controlled via the -Inbound or -Outbound swit
This script provides functionalities to manage (block/unblock) executables (EXEs) in specified directories via Windows Firewall. The operation can be targeted at individual directories or recursively applied to subdirectories as well.

By default, both Inbound and Outbound connections will be affected, but the scope can be controlled via the -Inbound or -Outbound switches.

Here are key switches to guide the script's behavior:
 -Path to specify the target directory.
 -Recurse switch will include all subdirectories in the operation.
 -UnblockInstead switch changes the operation mode from blocking to unblocking.
 -Inbound switch will only affect Inbound connections.
 -Outbound switch will only affect Outbound connections.

Additional utilities include:
 -Version switch displays the current version of the script.
 -Help switch brings up the help information for the script usage.
 -CheckForUpdate switch verifies if the current script version is up-to-date.

Special care should be taken when using this script due to its potentially broad impact. Blocking EXEs indiscriminately may disrupt applications depending on these executables.

For detailed examples of usage, refer to the .EXAMPLE section.
Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name BlockFolderWindowsFirewall

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • asherto

Tags

PowerShell Windows exe block firewall folder directory recursive

Functions

Get-GitHubRelease CheckForUpdate UpdateSelf Block-Exe Unblock-Exe

Dependencies

This script has no dependencies.

Release Notes

[Version 0.0.1] - Initial Release.
[Version 0.0.2] - Added recurse option.
[Version 0.0.3] - Updated code signing certificate.
[Version 1.0.0] - Major improvements. Added -Version, -Help, -CheckForUpdate. Added inbound/outbound option (will do both if not specified).
[Version 1.0.1] - Added additional line breaks, changed first line to warning, and added PowerShell gallery info to -CheckForUpdate
[Version 1.0.2] - Added UpdateSelf function, fixed CheckForUpdate function.

FileList

Version History

Version Downloads Last updated
1.0.2 (current version) 390 2/26/2024
1.0.1 220 6/23/2023
1.0.0 9 6/23/2023
0.0.3 63 5/19/2023
0.0.2 10 5/19/2023