Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Find Information about PowerShell Errors

$
0
0

Summary:  Use Windows PowerShell to find information about Windows PowerShell errors.

Hey, Scripting Guy! Question How can I find more information about a specific error when I look at the $error automatic variable?

Hey, Scripting Guy! Answer The $error automatic variable contain rich objects. For example, the InvocationInfo property shows
          what code was called that generated the error.
          The following illustrates how to find the most recent error (error 0):

$Error[0].InvocationInfo

Note  Tab expansion works for this.


Viewing all articles
Browse latest Browse all 17778

Trending Articles



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