Command
Invoke-IntelligenceXCommand
Executes a command through the app-server.
Syntax
Invoke-IntelligenceXCommand
-Command <string[]>
[-Client <IntelligenceXClient>]
[-NetworkAccess]
[-Raw]
[-SandboxType <string>]
[-TimeoutMs <int>]
[-WorkingDirectory <string>]
[-WritableRoot <string[]>]
[<CommonParameters>]#Examples
Example 1
Invoke-IntelligenceXCommand -Command @("git","status") -WorkingDirectory "C:\repo"Run a command in the repository root
Example 2
Invoke-IntelligenceXCommand -Command @("dotnet","test") -SandboxType "workspace" -WorkingDirectory "C:\repo"Run a command in a sandboxed workspace
Example 3
Invoke-IntelligenceXCommand -Command @("git","status") -TimeoutMs 5000Run a command with a timeout
Parameters
- -Command string[]
- Command and arguments.
- -Client IntelligenceXClient
- Client instance to use. Defaults to the active client.
- -NetworkAccess SwitchParameter
- Enable network access for sandboxed runs.
- -Raw SwitchParameter
- Return raw JSON response.
- -SandboxType string
- Sandbox type for execution.
- -TimeoutMs int
- Command timeout in milliseconds.
- -WorkingDirectory string
- Working directory for the command.
- -WritableRoot string[]
- Writable root paths for sandboxed runs.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.