Is it possible to have ValidateScript generate a custom error message when a test fails, like say Test-Path?
ValidateScript
Test-Path
Instead of this:
I am not sure.
A suggestion: maybe you want to just trap the error, and make your own message.
trap [Error.Type] { @" The message you want displayed. With maybe some additional information. I.e.: The full message itself: {0}' -f $_.Error.Message; continue; }