powershell_exec
Run Windows PowerShell commands, cmdlets, and scripts. Execute any PowerShell command with optional environment variables and working directory.
Instructions
Execute a command using Windows PowerShell. Supports all PowerShell cmdlets and scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Optional: Environment variables to set for the command (key-value pairs). Empty or null means no custom env vars. Example: {"NODE_ENV": "production", "MY_VAR": "value"} | |
| command | Yes | The PowerShell command to execute. Example: Get-Process or Get-ChildItem D:\ | |
| working_dir | No | Optional: Working directory for the command. Supports any drive. Example: D:\Projects |