Skip to content

Instantly share code, notes, and snippets.

@wgv-zbonham
Last active May 10, 2016 02:05
Show Gist options
  • Save wgv-zbonham/6d8d6380adc6b67a25e26f61100550a2 to your computer and use it in GitHub Desktop.
Save wgv-zbonham/6d8d6380adc6b67a25e26f61100550a2 to your computer and use it in GitHub Desktop.
List enum name and value from a .NET assembly
# 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