Powershell verbose output for chained exceptions

Question:

I’m new to powershell and troubleshooting an issue with one of our custom cmdlets. By default, all exceptions thrown within the cmdlet have minimum information, no stack trace and no info on chained exceptions. Is there a way to enable verbose output of exceptions?

Answer:

Here’s a neat function that I’ve stolen from someone on the ‘net :). I have it in my profile and will happily spread it further:

Source:

Powershell verbose output for chained exceptions by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply