Stop shell script on exception

We often set our shell scripts to stop upon exception rather than handling each one manually. This is accomplished in the Linux / MacOS Terminals by setting near the top of the .sh script file:

set -e

On any operating system, stop executing a Powershell script upon exception by adding near the top of the .ps1 Powershell script:

$ErrorActionPreference = 'Stop'