$error
is System.Collections.ArrayList
: PS C:\> $error.GetType().FullName System.Collections.ArrayList
ArrayList
have the type System.Management.Automation.ErrorRecord
: PS C:\> $error[0].GetType().FullName System.Management.Automation.ErrorRecord
$error
stores non-terminating errors (which are described by the ErrorRecord
type).