Press "Enter" to skip to content

Working with Enumerations in Powershell

Patrick Gruenauer counts the ways:

The enum statement can be used to declare an enumeration. Microsoft describes this statement as follows:

The enum statement allows you to create a strongly typed set of labels. That enumeration can be used in the code without having to parse or check for spelling errors.

Click through for more description, as well as an example of how to create, instantiate, and operate on enumerations.