Template for powershell script. Makes all errors "terminating" and send mail if error occurs