mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
19 lines
598 B
PowerShell
19 lines
598 B
PowerShell
|
|
param($Config = $null);
|
||
|
|
#
|
||
|
|
# Fetch the CPU Hardware informations
|
||
|
|
#
|
||
|
|
|
||
|
|
# Lets load some additional CPU informations, besides current performance counters
|
||
|
|
# It might be useful to get more details about the hardware itself
|
||
|
|
$CPUInformations = Get-CimInstance Win32_Processor;
|
||
|
|
[hashtable]$PhysicalCPUData = @{};
|
||
|
|
|
||
|
|
foreach ($cpu_properties in $CPUInformations) {
|
||
|
|
$cpu_datails = @{};
|
||
|
|
foreach($cpu_core in $cpu_properties.CimInstanceProperties) {
|
||
|
|
$cpu_datails.Add($cpu_core.Name, $cpu_core.Value);
|
||
|
|
}
|
||
|
|
$PhysicalCPUData.Add($cpu_datails.DeviceID, $cpu_datails);
|
||
|
|
}
|
||
|
|
|
||
|
|
return $PhysicalCPUData;
|