PowerTip: See Enumeration Value in PowerShell

The Scripting Guys

Dr Scripto

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

The Scripting Guys
Dr Scripto

Follow Dr Scripto   

No Comments.