Invoke-AIShell

Sends a query to the connected AIShell window. Results are shown in the AIShell window.

Syntax

Invoke-AIShell
      [-Query] <String>
      [-Agent <String>]
      [[-Context] <PSObject>]
      [<CommonParameters>]
Invoke-AIShell
      [-Query] <String>
      [-Agent <String>]
      [-ContextFromClipboard]
      [<CommonParameters>]

Description

This cmdlet sends a query to the open AIShell agent and results are shown in the AIShell window.

Examples

Example 1 - Send a query to the AIShell agent

Start-AIShell
Invoke-AIShell -Query "How do I list out the 5 most CPU intensive processes?"

This example sends a query, "How do I list out the 5 most CPU intensive processes?" to the AIShell agent. Responses are given in the AIShell window.

Parameters

-Agent

Specifies the agent to use in the current AIShell session. If not specified, AIShell uses the currently selected agent.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Context

Additional context information you want to send to the AIShell agent.

Type:PSObject
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ContextFromClipboard

Use the content in your clipboard as context information for the AIShell agent.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Query

The user input to send to the AIShell agent.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Outputs

Notes

PowerShell includes the following alias for this cmdlet:

  • All platforms:
    • askai