Sessions Run Command

Description

Runs the specified PowerShell script or command on the specified implant session and returns the result. Runs the specified PowerShell command and returns plaintext results back. Do not utilize JSON nor other serialization format. Use Format-List instead of Format-Table in your scripts. Use filters to minimize output and only select the necessary fields to reduce token usage. Use summarization to the greatest extent possible.

Example:

{
  "function_call": {
    "name": "SessionsRunCommand",
    "arguments": {
      "SessionId": "06042731d94c42d09a29d6ac00c24369",
      "Script": "dir | Select Length,FullName",
      "ScriptName": "Host-Basics",
      "ScriptDescription": "List files in the current directory",
      "Labels": "Recon, Passive",
      "WaitFor": -1
    }
  }
}
Scroll to Top