> For the complete documentation index, see [llms.txt](https://docs.poshtools.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.poshtools.com/open-source-tools/powershell-protect.md).

# PowerShell Protect

{% hint style="success" %}
Check out PowerShell Protect on [GitHub](https://github.com/ironmansoftware/powershell-protect).
{% endhint %}

PowerShell Protect provides auditing and blocking support for Windows PowerShell and PowerShell on Windows machines. It integrates with the Antimalware Scan Interface (AMSI) so scripts can be evaluated before they execute in any PowerShell host.

Use PowerShell Protect when you need configurable policy enforcement for PowerShell script execution, including built-in detections for common bypass and exploitation techniques.

![](/files/-MYfC8rBz6SkOhZyCLYK)

## Features

* Configurable blocking policies.
* Configurable audit policies.
* Audit output to file, HTTP, TCP, UDP, and event log actions.
* Optional AI-powered script scanning with OpenAI or Anthropic.
* Built-in blocking rules for common suspicious PowerShell techniques.
* Built-in rule names and descriptions available through the configuration.
* Windows PowerShell and PowerShell 7 support.
* File system or registry-backed configuration.

## Quick Example

```powershell
Install-Module PowerShellProtect
Install-PowerShellProtect

$Condition = New-PSPCondition -Property "command" -contains -Value "webrequest"
$BlockAction = New-PSPAction -Block
$Rule = New-PSPRule -Name "Web Request" -Condition $Condition -Action $BlockAction
$Configuration = New-PSPConfiguration -Rule $Rule -Action $BlockAction

Set-PSPConfiguration -Configuration $Configuration -FileSystem
```

Test a configuration before installing it.

```powershell
Test-PSPConfiguration -ConfigurationPath ".\config.xml" -ScriptBlock { Invoke-WebRequest }
```

## More Information

* [Changelog](https://github.com/ironmansoftware/powershell-protect/releases)
* [Installation](/open-source-tools/powershell-protect/installation.md)
* [System Requirements](/open-source-tools/powershell-protect/system-requirements.md)
* [Getting Started](/open-source-tools/powershell-protect/getting-started.md)
* [Configuration](/open-source-tools/powershell-protect/configuration.md)
* [Actions](/open-source-tools/powershell-protect/actions.md)
* [Rules](/open-source-tools/powershell-protect/rules.md)
* [Download](https://www.powershellgallery.com/packages/PowerShellProtect)
