mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Add support to fetch custom version of Icinga modules
This commit is contained in:
parent
77a8ea4071
commit
b9deef0bee
1 changed files with 14 additions and 0 deletions
14
lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1
Normal file
14
lib/core/framework/Get-IcingaPowerShellModuleVersion.psm1
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function Get-IcingaPowerShellModuleVersion()
|
||||
{
|
||||
param(
|
||||
$ModuleName
|
||||
);
|
||||
|
||||
$ModuleDetails = Get-Module -Name $ModuleName;
|
||||
|
||||
if ($null -eq $ModuleDetails) {
|
||||
return $null;
|
||||
}
|
||||
|
||||
return $ModuleDetails.PrivateData.Version;
|
||||
}
|
||||
Loading…
Reference in a new issue