ad_run_command
Execute PowerShell commands on a target domain controller for advanced Active Directory diagnostics or remediation; disabled by default and audit logged.
Instructions
Run an arbitrary PowerShell command on the target DC. WARNING: DANGEROUS - disabled by default. Set AD_ENABLE_RUN_COMMAND=true to enable. All executions are audit logged.
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": "ad_run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Target DC to run against (e.g., "DC1", "DC2"). Omit to use default. | |
| command | Yes | PowerShell command or script block to execute on the remote DC |