concept Add - Type in category powershell
appears as: Add-Type

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.
An enum type in .NET is a way of creating a fixed set of name-value constants. The ability to define these types is missing from PowerShell prior to version 5.0 (see chapter 19), but you can work around this by using Add-Type. You’ll define an enum that can be used to specify a coffee order. You’ll constrain the types of coffee orders you’ll allow to Latte, Mocha, Americano, Cappuccino, or Espresso. First, set a variable to the list of drink types:
Pass a string to Add-Type that contains the fragment of C# needed to define an enum type: