Export (0) Print
Expand All
Expand Minimize

Converting VBScript's Err Object Number Property


Windows PowerShell


Definition: Returns or sets a numeric value specifying an error. Number is the Err object's default property.

Number

We’re just guessing here, but we assume that the ErrorRecord property is designed to return the error number. However, we’ve never actually encountered a numbered error in Windows PowerShell; in our experience, ErrorRecord usually returns a string value such as this:



ScriptHalted

Still, you can always give this command a try and see what happens:



$error[0].errorrecord


Return to the VBScript to Windows PowerShell home page

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft