Most errors coming from cmdlets are "non-terminating" errors, which will not trigger a catch block. If you want to force errors to bew "terminating" and trigger your error handling code, you have a couple of options:
1. Set the magic variable $ErrorActionPreference = 'Stop' This will force all errors to be terminating, and the effect is global.
2. Set the common parameter -ErrorActionPreference 'Stop' (or shorthand -ea 1) when calling a particular cmdlet. The effect will only apply to that one cmdlet invocation.
Try one of those appraoches, and your try/catch should start working.
Thanks,
-Lincoln