When I use the function I would like it to get a dropdown list of "ValidationSet" after I typed in
"My-Function -Selected "
Function My-Function ( [CmdletBinding()] [Parameter(Position=0, Mandatory=$true)] [ValidateSet("Default", "SomethingElse", "Custom")] $Selected = "Default" ) { begin { switch ($Selected) { "Custom" { "code A" }"Default" {"Code B" } } } } My-Function -Selected "Custom"