I was wondering if there was a way to retrieve the values used in the clause Param()
for ValidateSet
. Something like this would be great:
Function Foo {
Param (
[ValidateSet('Startup', 'Shutdown', 'LogOn', 'LogOff')]
[String]$Type = 'Startup'
)
$Type.ValidateSet
}
But of course there is no such property on the Type
object. Is it possible to retrieve the values set in ValidateSet
?