Edit

Share via


Resolve-Error

Sends the last error in the current session for resolution in the connected AIShell window.

Syntax

Default (Default)

Resolve-Error
    [-Agent <String>]
    [-IncludeOutputFromClipboard]
    [<CommonParameters>]

Description

When an error occurs in the current session, this cmdlet sends the error to the AIShell agent for resolution. The command sends the full error object to the current AIShell agent session, which attempts to provide a resolution.

Beginning with theAI Shell v1.0.0-preview.2 release, the Resolve-Error cmdlet also works with error messages output from native commands.

Examples

Example 1 - Resolves the last error

PS> Start-AIShell
#User receives an error

PS> Resolve-Error

This example shows how to ask AIShell to resolve the last error that occurred in the current AIShell session. AIShell analyzes the error and attempts to provide a solution in the AIShell agent 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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeOutputFromClipboard

When this parameter is specified, the output copied to the clipboard is included in the error sent to AIShell.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
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.

Inputs

None

Outputs

Object

Notes

PowerShell includes the following alias for this cmdlet:

  • All platforms:
    • fixit