Invoke-AIShell
Sends a query to the connected AIShell window. Results are shown in the AIShell window.
Syntax
Default (Default)
Invoke-AIShell
-Query <String[]>
[-Agent <String>]
[-Context <PSObject>]
[<CommonParameters>]
Clipboard
Invoke-AIShell
-Query <String[]>
[-Agent <String>]
[-ContextFromClipboard]
[<CommonParameters>]
PostCode
Invoke-AIShell
[-PostCode]
[<CommonParameters>]
CopyCode
Invoke-AIShell
[-CopyCode]
[<CommonParameters>]
Exit
Invoke-AIShell
[-Exit]
[<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.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Default
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Clipboard
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Context
Additional context information you want to send to the AIShell agent.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Default
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ContextFromClipboard
Use the content in your clipboard as context information for the AIShell agent.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Clipboard
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CopyCode
Invokes /code copy
command in the AIShell sidecar session. This command copies the code in the
AIShell sidecar session to the clipboard.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CopyCode
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Exit
Invokes /exit
command in the AIShell sidecar session. This command closes the AIShell
sidecar session.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Exit
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PostCode
Invokes /code post
command in the AIShell sidecar session. This command posts the code in the
AIShell sidecar session to your PowerShell session.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostCode
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Query
The user input to send to the AIShell agent.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Default
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Clipboard
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs
Notes
PowerShell includes the following alias for this cmdlet: