I want to have access to the same message that Powershell prints when you send an error record to the output stream
Example:
This is the excep
How about:
$x = ($error[0] | out-string)
Is that what you wanted?