Last active
May 10, 2016 02:05
-
-
Save wgv-zbonham/6d8d6380adc6b67a25e26f61100550a2 to your computer and use it in GitHub Desktop.
List enum name and value from a .NET assembly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# running from same working directory as WatchGuard assemblies | |
# | |
$assembly = (Get-Item WatchGuard.Services.Contracts.dll).FullName | |
[system.reflection.assembly]::LoadFrom($assembly) | |
[Enum]::GetValues([WatchGuard.Services.AvduState]) | %{ Write-Host ( [int]$_):$_ } | |
# produces | |
# 0 :Unknown | |
# 1 :Enabled | |
# 2 :Disabled | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment