Sometimes you need a little bit more than the standard parameter validation options can provide – in that case use ValidateScript – you can write your own validation routine. For example: function test { [CmdletBinding()] param ( [parameter(Mandatory… Read the full text.