From a0e44ab251c712f46a4c261d350e99f98fdd4b26 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Sun, 3 Nov 2019 15:54:25 +0100 Subject: [PATCH] Add support to fetch custom version of Icinga modules --- .../Get-IcingaPowerShellModuleVersion.psm1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1 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; +}