run_powershell_script
Execute PowerShell script files with arguments, configurable working directory, and timeout for reliable Windows automation.
Instructions
Execute a PowerShell script file (.ps1) with arguments. Full system access with MCP-safe subprocess handling.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"script_path": "<script_path>"
},
"name": "run_powershell_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (default: script's directory) | |
| args | No | Arguments to pass to script | |
| timeout_ms | No | Timeout in milliseconds (default: 60000, max: 600000) | |
| script_path | Yes | Path to PowerShell script (.ps1) |