---
# System prepended metadata

title: Monitoring PC Temperature
tags: [script, powershell, windows]

---

# Monitoring PC Temperature

###### tags: `script`, `windows`, `powershell`

# CPU

``` powershell
(($temperatures = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" | Select-Object -ExpandProperty CurrentTemperature)[0] + $temperatures[1]) / 2 / 10 - 273.15
```

# hard disk

``` powershell
Get-PhysicalDisk | Select-Object FriendlyName, @{Name='Temperature';Expression={(Get-StorageReliabilityCounter -PhysicalDisk $_).Temperature}} | Format-Table -HideTableHeaders


Get-PhysicalDisk | Where-Object {$_.FriendlyName -eq 'Samsung SSD 970 EVO Plus 1TB'} | Select-Object FriendlyName, @{Name='Temperature'; Expression={(Get-StorageReliabilityCounter -PhysicalDisk $_).Temperature}} | Format-Table -HideTableHeaders


```

# NVIDIA GPU

```
nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader
```