Public/Get-Enum.ps1
function Get-Enum { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter','')] param ( [string]$FindEnumValue, [String]$FindEnumName, [switch]$IncludeAllEnums ) $defaultManifestModules = 'CommonLanguageRuntimeLibrary', 'Microsoft.CSharp.dll', 'Microsoft.Management.Infrastructure.dll', 'Microsoft.PowerShell.Commands.Management.dll', 'Microsoft.PowerShell.commands.Utility.dll', 'System.dll', 'System.Configuration.dll', 'System.Configuration.Install.dll', 'System.Core.dll', 'System.Data.dll', 'System.DirectoryServices.dll', 'System.Management.Automation.dll', 'System.Management.dll', 'System.ServiceProcess.dll', 'System.Transactions.dll', 'System.Xml.dll' [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object -FilterScript { $IncludeAllEnums -or ($defaultManifestModules -contains $_.ManifestModule) } | ForEach-Object -Process { try { $_.GetExportedTypes() } catch { "Keine ExportedTypes vorhanden" | Write-Verbose } } | Where-Object -FilterScript { $_.IsEnum -and $_.Name -IMatch $FindEnumName } | ForEach-Object -Process { return [PSCustomObject]@{ Name = $_.FullName Source = $_.Module.ScopeName Values = [System.Enum]::GetNames($_) } } | Where-Object -Property Values -IMatch -Value $FindEnumValue } # SIG # Begin signature block # MIIcZAYJKoZIhvcNAQcCoIIcVTCCHFECAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBWouR4S7adXYTy # p8a6jGitV8PBIFCQk5VveJnyFFQGsKCCFn8wggNyMIICWqADAgECAhA8emkJ82H0 # pEx+itPRny0WMA0GCSqGSIb3DQEBDQUAMFExIzAhBgkqhkiG9w0BCQEWFGluZm9A # YXR0aWxha3JpY2suY29tMSowKAYDVQQDDCFBdHRpbGEgS3JpY2sgKFNvZnR3YXJl # IERldmVsb3BlcikwHhcNMjIxMDE2MT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dGFtcGluZyBDQQIQBUSv85SdCDmmv9s/X+VhFjANBglg # hkgBZQMEAgEFAKBpMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcN # AQkFMQ8XDTI0MDMwNTIwMDQxN1owLwYJKoZIhvcNAQkEMSIEIFc+8sS5XwH7uiML # XH3gdWTEE5NaHCI0Sg3UZDBxs6hlMA0GCSqGSIb3DQEBAQUABIICAERLMfae8syj # b0orazw9miKYJlteYjLx43dQvNtQGpI98IVkaBbU6CxHQfPxraj/1siUhqC8HFi7 # AKhYyVY4jLYq8bskriQ5sjCg45KxQNvr5377aKGtWGhiLKqsBvFvCy/A+SKW8p6K # ANm21v/u148KGnG7LGPSbI1OXTT04nIpvzmmZKADpY4kAZ54P8hJIBz97iLB9AZY # i+T2WY1pbV6sgmZkhRZlwn2W1onl7T/LLFMleLwYhOdzYNoatcXt3Na13iultbay # B5Dtbom0+12il2bm+ECj90tJB8LOVIX+O+zjxVa6UhyMAmMGV0CIkdmevZcuE7Tz # DQA5N5oPWT7lUVOMmxOttvwQ5EbU2dHXcU/Ddm1Tm1hd4wazhRNOwAQNrHyruqJX # syn9dfRkas6oK61Q//U8neSBQagkwZN/LfRzEXjOrB2f9GjY1vkV6TT9n8F56bSP # COagc6qK4mpLivZzdmBQDsNiwks+lSv562Omv3alLjNIzxQdjJgXJq0HeOGdX0HD # bJC9ScuoaUfKeOmLeHnEeeH9ohq4rfsy+s2EYPtzWiWj3IbApTJymYrt8H1O0+z8 # U+UBbfSWQOLsNMQvOxZpk7tOB1F9trZII7IJ5zsDHYXIQwoN+eeFS5sL6SCjyZZO # uFtTGccMhcK4XTPgvYsU7hIh4WPd4Wg1 # SIG # End signature block |