Get-ErrorInfo
Gets an error information object.
Syntax
Default (Default)
Get-ErrorInfo
[[-errorIndex] <Int32>]
[<CommonParameters>]
Description
The Get-ErrorInfo cmdlet gets an error information object.
Examples
1: Get error object at index 3
PS C:\>Get-ErrorInfo -errorIndex 3
This command gets the error object at the index 3.
2: Get error object
PS C:\>Get-ErrorInfo
This command gets the error object at the index 0. This is the most recent error object.
Parameters
-errorIndex
Specifies the index of the error object to get.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
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.