Assembly: System.Management.Automation (in System.Management.Automation.dll)
Windows PowerShell defines certain exception classes that implement this interface. This includes wrapper exceptions such as System.Management.Automation.CmdletInvocationException and Windows PowerShell runtime exceptions such as System.Management.Automation.GetValueException.
This interface should be implemented only when the exception is thrown when there is no reference to an active cmdlet or provider.
This interface should not be implemented by cmdlets and providers. Instead, cmdlets and providers should call the following methods.
For cmdlets, call one of the following methods:
For providers, call one of the following methods.
Windows PowerShell snap-ins can implement custom exception classes that implement IContainsErrorRecord. However, it is generally preferable for cmdlets and providers to communicate error records using the methods listed previously, rather than the snap-in throwing an exception that implements IContainsErrorRecord.
Target PlatformsWindows Developer Preview, Windows Server Developer Preview
Send comments about this topic to Microsoft.