Resolve-Error
SYNOPSISโ
Enumerate error record details.
SYNTAXโ
Resolve-Error [[-ErrorRecord] <Array>] [[-Property] <String[]>] [-GetErrorRecord] [-GetErrorInvocation]
[-GetErrorException] [-GetErrorInnerException] [<CommonParameters>]
DESCRIPTIONโ
Enumerate an error record, or a collection of error record, properties. By default, the details for the last error will be enumerated.
EXAMPLESโ
EXAMPLE 1โ
Resolve-Error
EXAMPLE 2โ
Resolve-Error -Property *
EXAMPLE 3โ
Resolve-Error -Property InnerException
EXAMPLE 4โ
Resolve-Error -GetErrorInvocation:$false
PARAMETERSโ
-ErrorRecordโ
The error record to resolve. The default error record is the latest one: $global:Error[0]. This parameter will also accept an array of error records.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Propertyโ
The list of properties to display from the error record. Use "*" to display all properties.
Default list of error properties is: Message, FullyQualifiedErrorId, ScriptStackTrace, PositionMessage, InnerException
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: ('Message', 'InnerException', 'FullyQualifiedErrorId', 'ScriptStackTrace', 'PositionMessage')
Accept pipeline input: False
Accept wildcard characters: False
-GetErrorRecordโ
Get error record details as represented by $_.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-GetErrorInvocationโ
Get error record invocation information as represented by $_.InvocationInfo.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-GetErrorExceptionโ
Get error record exception details as represented by $_.Exception.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-GetErrorInnerExceptionโ
Get error record inner exception details as represented by $_.Exception.InnerException. Will retrieve all inner exceptions if there is more than one.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
CommonParametersโ
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.