mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Binary-Addition in relevant files for enums
This commit is contained in:
parent
3c16c17588
commit
1a43cf36da
2 changed files with 18 additions and 2 deletions
|
|
@ -8,6 +8,14 @@ function Get-IcingaMemory ()
|
|||
[hashtable]$MEMData = @{};
|
||||
|
||||
foreach($memory in $MEMInformation) {
|
||||
|
||||
$TypeDetail = @();
|
||||
$ProviderEnums.MemoryTypeDetail.Keys | Where-Object {
|
||||
$_ -band $memory.TypeDetail
|
||||
} | ForEach-Object {
|
||||
$TypeDetail += $ProviderEnums.MemoryTypeDetail.Get_Item($_);
|
||||
};
|
||||
|
||||
$MEMData.Add(
|
||||
$memory.tag.trim("Physical Memory"), @{
|
||||
'metadata' = @{
|
||||
|
|
@ -46,7 +54,7 @@ function Get-IcingaMemory ()
|
|||
};
|
||||
'TypeDetail' = @{
|
||||
'raw' = $memory.TypeDetail;
|
||||
'value' = $ProviderEnums.MemoryTypeDetail[[int]$memory.TypeDetail];
|
||||
'value' = $TypeDetail;
|
||||
};
|
||||
};
|
||||
'specs' = @{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
Import-Module $IncludeDir\provider\enums\Icinga_ProviderEnums;
|
||||
|
||||
|
||||
function Get-IcingaWindows()
|
||||
{
|
||||
$WindowsInformations = Get-CimInstance Win32_OperatingSystem;
|
||||
|
||||
$OSProductSuite = @();
|
||||
$ProviderEnums.WindowsOSProductSuite.Keys | Where-Object {
|
||||
$_ -band $WindowsInformations.OSProductSuite
|
||||
} | ForEach-Object {
|
||||
$OSProductSuite += $ProviderEnums.WindowsOSProductSuite.Get_Item($_);
|
||||
};
|
||||
|
||||
$windows_datails = @{};
|
||||
$windows_datails.Add(
|
||||
'windows', @{
|
||||
|
|
@ -23,7 +31,7 @@ function Get-IcingaWindows()
|
|||
};
|
||||
'OSProductSuite' = @{
|
||||
'raw' = $WindowsInformations.OSProductSuite;
|
||||
'value' = $ProviderEnums.WindowsOSProductSuite[[int]$WindowsInformations.OSProductSuite];
|
||||
'value' = $OSProductSuite;
|
||||
};
|
||||
'ProductType' = @{
|
||||
'raw' = $WindowsInformations.ProductType;
|
||||
|
|
|
|||
Loading…
Reference in a new issue