Customizing Parameter Validation Errors In PowerShell

Have you ever run a function or cmdlet in PowerShell and been greeted by an archaic error? You think you may have typed in a parameter wrong, but you’re not sure which one or even what to fix. Of course, you vow to never write a function that will have that problem, the only thing is that you may not know all the ways of customizing parameter validation in Powershell.Well good thing Josh knows a thing or two about that very topic! Have you seen all of the videos he’s done on all of these things? I don’t think that guy sleeps. Anyway, you can tell he knows PowerShell and parameter validation because he’s about to use the ValidateScript parameter validation attribute in this video to output his own errors. No more archaic errors for us now! We love you Josh.