28 September 2015

Powershell enum type

Add-Type -TypeDefinition @"
    public enum MyEnum{
        Paper,
        Rock,
        Scisor
    }
"@

[MyEnum]$abc = [MyEnum]::Rock

No comments:

Post a Comment