powershell_run
Execute bounded PowerShell scripts on local or registered SSH targets, enforcing output limits and timeouts for controlled remote administration.
Instructions
Run bounded PowerShell on target='local' or target='ssh:'.
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": {
"target": "<target>",
"script": "<script>"
},
"name": "powershell_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Optional case-insensitive .NET regular expression with a 100 ms match timeout. | |
| script | Yes | PowerShell script executed with the selected target account's authority. | |
| target | Yes | Explicit target: 'local' or a registered 'ssh:<alias>'. | |
| max_bytes | No | Maximum UTF-8 command output bytes; excludes the short terminal status decoration. | |
| max_lines | No | Maximum output lines; 0 disables only the line limit and remains byte-bounded. | |
| timeout_seconds | No | Execution timeout in seconds. | |
| include_raw_records | No | Include low-level protocol records for diagnostics; may expose sensitive output details. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| host | No | ||
| output | Yes | ||
| failure | No | ||
| message | No | ||
| partial | No | ||
| records | No | ||
| exit_code | No | ||
| emitted_bytes | No | ||
| emitted_lines | No | ||
| observed_bytes | No | ||
| observed_lines | No | ||
| output_complete | No | ||
| timeout_seconds | No | ||
| transport_exit_code | No | ||
| byte_suppressed_bytes | No | ||
| byte_suppressed_lines | No | ||
| line_suppressed_bytes | No | ||
| line_suppressed_lines | No | ||
| filter_suppressed_bytes | No | ||
| filter_suppressed_lines | No | ||
| cancellation_unconfirmed | No | ||
| diagnostic_suppressed_bytes | No | ||
| diagnostic_suppressed_lines | No |