run_command_as_admin
Execute shell commands with Administrator privileges, handling Windows UAC elevation prompts and capturing command output for secure administrative tasks.
Instructions
Run a shell command with Administrator privileges.
If the server is not already elevated this triggers a Windows UAC prompt that the user must approve. Output is captured and returned. This runs commands with full administrative rights - use with care.
Args: params (RunAsAdminInput): the command line and a timeout.
Returns: str: JSON {"ok": bool, "returncode": int, "output": "...", "elevated_prompt": bool}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |