Invoke-AICommand
Used by an MCP in AI Shell to invoke a command in the connected PowerShell session.
Syntax
Default (Default)
Invoke-AICommand
[-Command] <ScriptBlock>
[<CommonParameters>]
Description
MCPs in AI Shell use this cmdlet to invoke a command in the connected PowerShell session. This command is not intended for users to directly invoke. When an AI model creates a result containing commands, the MCP can use this cmdlet to execute the commands in the connected PowerShell session.
Parameters
-Command
The scriptblock to be executed.
Parameter properties
| Type: | ScriptBlock |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| 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.