mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
15 lines
415 B
PowerShell
15 lines
415 B
PowerShell
|
|
function Show-IcingaCPUData(){
|
||
|
|
|
||
|
|
$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;
|
||
|
|
}
|