I am using C# to create PowerShell cmdlets. For one of the parameters, I am using ValidateSet.
[ValidateNotNullOrEmpty]
[ValidateSet(new string[]{"STANDARD", "CUSTOM","MINIMUM","DEFAULT"},IgnoreCase=true)]
[Parameter(
Mandatory = true,
ValueFromPipelineByPropertyName = false,
ValueFromPipeline = false,
HelpMessage = "House Mode")
]
[Alias("hm")]
public string HouseMode
{
get { return m_housemode; }
set { m_housemode = value; }
}
How can I make the value of the ValidateSet appear in the tab-completion list?
This is from the Format-Hex command in PSCX:
Tab completion works on this parameter. In your case, I think you want to specify the attribute like this: