winrm_execute_cmd
Execute CMD commands on Windows hosts over WinRM and return stdout, stderr, and exit code. Set environment variables, working directory, and timeout to control remote command runs.
Instructions
Execute a CMD command over WinRM and return stdout, stderr, and exit code. env sets real process environment variables (usable as %NAME%). On timeout the remote process is terminated.
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": {
"command": "<command>"
},
"name": "winrm_execute_cmd"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| env | No | ||
| command | Yes | ||
| timeout | No | ||
| connection | No | ||
| saved_host | No | ||
| output_limit | No | ||
| inventory_scope | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||