PowerTip: Find Numeric Value of Enum in PowerShell
Summary: Learn how to easily find the numeric value of an enum in Windows PowerShell.
How can I use Windows PowerShell to easily find the numeric value of an enumeration?
Use square brackets to call the enum, call the enumeration property as a static property, and reference3
the value__ property. Here is an example using the [fruit] enum created in yesterday’s post,
New PowerShell 5 Feature: Enumerations: