When PowerShell encounters a problem, it displays a rather lengthy error message:
Attempted to divide by zero.
At line:1 char:1
+ CategoryInfo : NotSpecified: (:) , RuntimeException
+ FullyQualifiedErrorId : RuntimeException
In real life, you often just need the first line, and as early as in 2006, the PowerShell team added a preference variable called $ErrorView that can…