To demonstrate the new method of displaying run time errors, consider this script:
# EV1.ps1 - Script to show error view in runtime## Do something$A = 42$B = $aOk - nothing overly exciting but that's not the point. The script should generate two errors.
# Now do something tht generates an error (no such file)Get-ChildItem -Path C:\Foo\bar\42.txt## Now another error1/0# And finish"All Done"
In Windows PowerShell (OR if you are running PowerShell 7 with $ErrorView set to "NormalView"), running this script looks like this:
Now - PowerShell 7,. if you are set $ErrorView to "ConciseView" and rerun the script you still get the terrors (or course!), but PowerShell displays them like this: