Powershell Tip #111: Get names and values of Enum

By | August 16, 2016

Tip: You can get the names / values of an Enumeration object by using the GetEnumNames or GetEnumValues static method.

You can identify enumeration by the Enum keyword.


Here is an example with thefile attributes from System.IO namespace.

FileAttributes Enumeration

Note: For versions prior to PowerShell v3 :


To see the list of enumerations from System.IO Namespace :

System.IO Namespace


2 thoughts on “Powershell Tip #111: Get names and values of Enum

  1. Pingback: Powershell Tip #112: Get int values from Enum | Powershell Guru

  2. Pingback: Powershell Tip #110: Replace multiple spaces by one comma - Powershell Guru

Leave a Reply

Your email address will not be published.