diff --git a/lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1 b/lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1 new file mode 100644 index 0000000..14d9d4c --- /dev/null +++ b/lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1 @@ -0,0 +1,14 @@ +function Get-IcingaPowerShellModuleVersion() +{ + param( + $ModuleName + ); + + $ModuleDetails = Get-Module -Name $ModuleName; + + if ($null -eq $ModuleDetails) { + return $null; + } + + return $ModuleDetails.PrivateData.Version; +}