# Invoke-IntelligenceXRpc

Invokes a raw JSON-RPC method directly against app-server.

Command 

**Module**

`IntelligenceX.PowerShell`

**Inputs**

`IntelligenceX.OpenAI.IntelligenceXClient`

**Outputs**

`IntelligenceX.Json.JsonValue`

Invokes a raw JSON-RPC method directly against app-server.

## Syntax

```
Invoke-IntelligenceXRpc
-Method <string>
[-Client <IntelligenceXClient>]
[-Params <object>]
[<CommonParameters>]
```

[#](#method-invoke-intelligencexrpc-string-intelligencexclient-object)

## Examples

### Example 1

```powershell
Invoke-IntelligenceXRpc -Method "thread/list" -Params @{ limit = 10 }
```

Call a raw RPC method

### Example 2

```powershell
Invoke-IntelligenceXRpc -Method "config/read"
```

Read config using raw JSON-RPC

### Example 3

```powershell
Invoke-IntelligenceXRpc -Method "command/exec" -Params @{ command = "dotnet --info"; cwd = (Get-Location).Path }
```

Call an RPC method with nested parameters

## Parameters

**-Method string required**

JSON-RPC method name (for example thread/list).

**-Client IntelligenceXClient optionalpipeline: true (ByValue)**

Client instance to use. Defaults to the active client.

**-Params object optional**

Optional method parameters supplied as a PowerShell object/hashtable.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:0B721ED0590BAB9BFA2A873E1990D588EC0A1FA5859D4B3052E40A267C0FEA41 -->
