Handling enums as cmdlet parameters.
Summary of the new feature / enhancement
Changing the handling of enums as cmdlet parameters uses to display the possible values the values of the enum and the get the name for the value. Therefore xou get the same text if more than one name has the same value (see example below).
Proposed technical implementation details (optional)
<# Display option when using an enum as a parameter of an CmdLet. #>
Enum TestAction { Ignore = 0 Skip = 0 Replace = 1 New = 1 Remove = 2 Detete = 2
} # Enum TestAction
Function Test-Enum { param ( [Parameter( Mandatory )] [TestAction] $Action ) <#Do something#>
} # Function Test-Enum
<#
If you enter on a prompt
Test-Enum -Action