Summary: Learn how to see the most recent error in Windows PowerShell.
I ran a script that fails. How can I use Windows PowerShell to find the most recent error?
Use $error, and to see the most recent error, look at error 0:
$error[0]
Summary: Learn how to see the most recent error in Windows PowerShell.
I ran a script that fails. How can I use Windows PowerShell to find the most recent error?
Use $error, and to see the most recent error, look at error 0:
$error[0]