PowerShell script creates a computer list from an AD OU, and add exclusions to a specific file via Invoke-Command
Your try block will be unable to pass the error to catch block if you don't use -ErrorAction Stop. Also there is an -ErrorAction Ignore on powershell v3.0+ that completely ignores the error.