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