Search notes:

PowerShell: the automatic variable $error

Type of $error

The type of $error is System.Collections.ArrayList:
PS C:\> $error.GetType().FullName
System.Collections.ArrayList
The individual elements of this ArrayList have the type System.Management.Automation.ErrorRecord:
PS C:\> $error[0].GetType().FullName
System.Management.Automation.ErrorRecord

Content of $error

$error stores non-terminating errors (which are described by the ErrorRecord type).

See also

The common cmdlet parameter -errorVariable
Other automatic variables
Error handling in PowerShell

Index