Get-ErrorInfo

Gets an error information object.

Syntax

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.

Type:Int32
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False