PowerTip: See Enumeration Value in PowerShell


Summary: Learn how to retrieve an enumeration value in Windows PowerShell.

Hey, Scripting Guy! Question How can I see enumeration allowed values in Windows PowerShell?

Hey, Scripting Guy! AnswerPlace the enumeration name in square brackets, and use the double colon syntax to retrieve a specific property.
          IntelliSense will show you permissible values. Here is an example using an enumeration called Fruit:

[fruit]::pear

Comments (0)

Skip to main content