Catching FULL exception message
Errors and exceptions in PowerShell are structured objects. The error message you see printed on the console is actually a formatted message with information from several elements of the error/exception object. You can (re-)construct it yourself like this: $formatstring = “{0} : {1}`n{2}`n” + ” + CategoryInfo : {3}`n” + ” + FullyQualifiedErrorId : {4}`n” … Read more