Skip to content

DynamicOption PowerShell

Garrett Serack edited this page May 19, 2014 · 9 revisions

DynamicOption class

public class DynamicOption {
    public OptionCategory Category { get; set; }
    public OptionType Type { get; set; }
    public string Name { get; set; }
    public bool IsRequired { get; set; }
    public IEnumerable<string> PossibleValues {get; set;}
    public string HelpText { get; set; }
}

Dynamic Options are specified for a given category:

Value Purpose
Category The operation that the dynamic option is for (see [[OptionCategory enum
Type the data type for the option (see [[OptionType enum
Name the option name. This is exposed to the end user.
IsRequired indicates that this option is required for this operation. If not present, the host should not proceed.
PossibleValues a collection of possible values the user is permitted to specify.
HelpText a string describing the 'help' for this dynamic option .