Powershell – monitorowanie temperatury CPU

function Get-Temperature {
    $t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
    $returntemp = @()

    foreach ($temp in $t.CurrentTemperature)
    {
    $currentTempCelsius = ($temp / 10) - 273.15    
    $returntemp += $currentTempCelsius.ToString()
    }
    return $returntemp
}
Get-Temperature