ScriptWhitelistGuard

1.0.0

Interactive PowerShell script execution guard with SHA256 whitelist verification. Intercepts external .ps1 script execution at the PSReadLine level, validates against a whitelist, and transparently rewrites approved commands to execute with -ExecutionPolicy Bypass. Not a security boundary - primarily for workflow safety.

Minimum PowerShell version

5.1

Installation Options

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

Install-Module -Name ScriptWhitelistGuard

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

Install-PSResource -Name ScriptWhitelistGuard

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

Copyright

(c) 2026 Xiamen Moefire Technology Co.,Ltd. All rights reserved.

Package Details

Author(s)

  • Xiamen Moefire Technology Co.Ltd.

Tags

Security PowerShell Whitelist ExecutionPolicy PSReadLine Guard Script Validation SHA256

Functions

Add-ScriptWhitelist Remove-ScriptWhitelist Test-ScriptWhitelist Get-ScriptWhitelist Repair-ScriptWhitelist Enable-WhitelistGuard Disable-WhitelistGuard

PSEditions

Desktop Core

Dependencies

Release Notes

# Version 1.0.0

Initial release of ScriptWhitelistGuard

## Features
- SHA256-based whitelist validation for external PowerShell scripts
- Interactive command interception via PSReadLine Enter key handler
- Transparent command rewriting for whitelisted scripts (-ExecutionPolicy Bypass)
- Persistent auto-enable via PowerShell profile integration
- Environment variable support for custom whitelist storage path
- Seven core cmdlets for whitelist management
- Cross-platform support (PowerShell 5.1+ and PowerShell 7+)

## Cmdlets
- Add-ScriptWhitelist: Add or update script in whitelist
- Remove-ScriptWhitelist: Remove script from whitelist
- Test-ScriptWhitelist: Verify script whitelist status and hash
- Get-ScriptWhitelist: List all whitelisted scripts
- Repair-ScriptWhitelist: Update hash for modified scripts
- Enable-WhitelistGuard: Activate guard with optional profile persistence
- Disable-WhitelistGuard: Deactivate guard with optional profile cleanup

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 5 1/29/2026