People often use dynamic parameters so they can dynamically generate a ValidateSet attribute.
We should provide a simpler way to do this. One option is to accept a scriptblock:
param(
[ValidateSet( { Get-ChildItem -ah | ForEach-Object Name } )]
$HiddenFileName
)
People often use dynamic parameters so they can dynamically generate a
ValidateSetattribute.We should provide a simpler way to do this. One option is to accept a scriptblock: