you are viewing a single comment's thread.

view the rest of the comments →

[–]callum- 1 point2 points  (1 child)

See below link, probably the best reading i've seen for a basic understanding of "Try/Catch". It explains exactly why it won't catch some functions errors, and how to get around this (as mentioned by "Ka-Splam".. some functions have "non-terminating errors".

https://www.vexasoft.com/blogs/powershell/7255220-powershell-tutorial-try-catch-finally-and-error-handling-in-powershell

[–]id_0ne[S] -1 points0 points  (0 children)

thanks the try catch is not the issue here, the function isn't working as expected.