Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Look at Most Recent Error in PowerShell

$
0
0

Summary: Learn how to see the most recent error in Windows PowerShell.

Hey, Scripting Guy! Question I ran a script that fails. How can I use Windows PowerShell to find the most recent error?

Hey, Scripting Guy! Answer Use $error, and to see the most recent error, look at error 0:

$error[0]


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>