Erik
                                            Erik
                                        
                                    I've adopted @christianacca's solution to most of my code. Thanks. :) Any thoughts on how to best throw inside a ValidateScript()-attribute of a parameter, e.g. if I were to check...
Can you provide an example @ChrisLGardner? Where do you keep the dedicated function(s)? Can one do the argument validation in the begin block instead?
Thanks! So you invoke Test-VmcPathValidation like this? ``` [Para...] [ValidateScript({Test-VmcPathValidation})] [..]$Path ``` Is it preferred to use $PSCmdlet.ThrowTerminatingError($_) / throw in the ValidateScript-attribute instead of a Write-Error?
Would also appreciate this. :)
I met this need during some Pester V4 to Pester V5 conversion. The proposed solution looks great.