#Change the Skrypt PowerShella execution policy to allow all local scripts to run.
Set-ExecutionPolicy Remotesigned

#Write an error handler for a script that catches all error, writes the error message in light red and then continues the script.

trap {
	Write-Host ("### ERROR: " + $_.Exception.Message) -ForegroundColor yellow
	continue
}

Do-Mistake
Do-AnnotherMistake
Do-AndYetAnnother

# 	Check if an instance of Internet Explorer is running and throw an error message with the text "No Internet Explorer process" if there is no such process.

$p = Get-Process iexplore -ErrorAction silentlycontinue

if ($p -eq $null) { throw "No Internet Explorer process" }