Describes a terminating or nonterminating error that occurred during the processing of a command.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)
Dim instance As ErrorRecord
<SerializableAttribute> _
Public Class ErrorRecord
Implements ISerializable
[SerializableAttribute]
public class ErrorRecord : ISerializable
[SerializableAttribute]
public ref class ErrorRecord : ISerializable
/** @attribute SerializableAttribute() */
public class ErrorRecord implements ISerializable
SerializableAttribute
public class ErrorRecord implements ISerializable
The ErrorRecord class is used only by the Windows PowerShell runtime. There are no established scenarios for deriving from this class. For more information about error records, see Windows PowerShell Error Records.
Error records that describe terminating errors are reported when the Cmdlet.ThrowTerminatingError method and the CmdletProvider.ThrowTerminatingError method are called.
Error records that describe nonterminating errors are reported by calling the Cmdlet.WriteError method and the CmdletProvider.WriteError method.
Error records are also used by several exceptions that are thrown by the Windows PowerShell runtime.
System.Object
System.Management.Automation.ErrorRecord
System.Management.Automation.Runspaces.RemotingErrorRecord
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Development Platforms
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 7, Windows 2008 R2 Target Platforms
Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP, Windows 7, Windows 2008 R2