SkillAgentSearch skills...

PowerShell.HardwareMonitor

Module for local and remote data acquisition temperature, load and other sensors system, for implement monitoring via InfluxDB and Grafana

Install / Use

/learn @Lifailon/PowerShell.HardwareMonitor

README

PowerShell.HardwareMonitor

GitHub Tag NuGet Version GitHub top language

Publication on Habr (ru language): Мониторинг температуры Windows. Создание метрик, настройка InfluxDB и Grafana

Module for local and remote data acquisition temperature, fan speeds, load and other sensors system via LibreHardwareMonitor and OpenHardwareMonitor to output PowerShell console.

This module implements an out-of-the-box and universal solution for configuring temperature sensor monitoring with InfluxDB v1.x and visualization in Grafana.

🔗 Implemented methods to get information:

  • ✅ REST API
  • ✅ WMI/CIM
  • ✅ Library .NET (incomplete)

📌 Notes:

🚀 Install

📥 Module

Install module from NuGet repository:

Install-Module HardwareMonitor -Repository NuGet -Scope AllUsers

Use the installation for all users (parameter Scoop) to avoid importing the module during script configuration to send data to the database during service creation.

💡 You must have a NuGet repository registered:

Register-PSRepository -Name "NuGet" -SourceLocation "https://www.nuget.org/api/v2" -InstallationPolicy Trusted

Import the module and get a list of available commands:

Import-Module HardwareMonitor
Get-Command -Module HardwareMonitor

CommandType     Name                               Version    Source
-----------     ----                               -------    ------
Function        Get-Sensor                         0.4        HardwareMonitor
Function        Install-LibreHardwareMonitor       0.4        HardwareMonitor
Function        Install-OpenHardwareMonitor        0.4        HardwareMonitor
Function        Send-SensorToInfluxDB              0.4        HardwareMonitor

💡 Dependencies

You need to set one of the two data retrieval sources. You can use the functions built into the module to set them (default installation path C:\Users\<UserName>\Documents):

Install-LibreHardwareMonitor
Install-OpenHardwareMonitor

📑 Data

Difference in the amount of unique (non-empty) data, using the HUAWEI MateBook X Pro laptop as an example.

REST API via OpenHardwareMonitor

The software can act as an agent for data from which it can be collected remotely.

> Get-Sensor -ComputerName 192.168.3.99 -Port 8086 | Format-Table

HardwareName                 SensorName SensorType       Value   Min     Max
------------                 ---------- ----------       -----   ---     ---
12th Gen Intel Core i7-1260P Load       CPU Total        7,3 %   2,0 %   17,2 %
12th Gen Intel Core i7-1260P Load       CPU Core #1      11,7 %  0,0 %   50,0 %
12th Gen Intel Core i7-1260P Load       CPU Core #2      0,0 %   0,0 %   27,3 %
12th Gen Intel Core i7-1260P Load       CPU Core #3      0,0 %   0,0 %   18,0 %
12th Gen Intel Core i7-1260P Load       CPU Core #4      0,0 %   0,0 %   4,8 %
12th Gen Intel Core i7-1260P Load       CPU Core #5      10,9 %  0,0 %   28,1 %
12th Gen Intel Core i7-1260P Load       CPU Core #6      7,8 %   0,0 %   45,3 %
12th Gen Intel Core i7-1260P Load       CPU Core #7      9,4 %   0,0 %   51,6 %
12th Gen Intel Core i7-1260P Load       CPU Core #8      18,8 %  0,0 %   46,9 %
12th Gen Intel Core i7-1260P Load       CPU Core #9      9,4 %   0,0 %   18,8 %
12th Gen Intel Core i7-1260P Load       CPU Core #10     4,7 %   0,0 %   23,4 %
12th Gen Intel Core i7-1260P Load       CPU Core #11     21,9 %  0,0 %   34,4 %
12th Gen Intel Core i7-1260P Load       CPU Core #12     10,9 %  0,0 %   26,6 %
Generic Memory               Load       Memory           75,3 %  73,5 %  76,3 %
Generic Memory               Data       Used Memory      11,8 GB 11,6 GB 12,0 GB
Generic Memory               Data       Available Memory 3,9 GB  3,7 GB  4,2 GB

REST API via LibreHardwareMonitor

You can also use authorization (if it is configured on the LibreHardwareMonitor side):

> Get-Sensor -ComputerName 192.168.3.99 -Port 8085
Invoke-RestMethod: Response status code does not indicate success: 401 (Unauthorized).
> Get-Sensor -ComputerName 192.168.3.99 -Port 8085 -User hardware -Password monitor | Where-Object Value -notmatch "^0,0" | Format-Table

HardwareName                     SensorName                     SensorType      Value   Min       Max
------------                     ----------                     ----------      -----   ---       ---
12th Gen Intel Core i7-1260P     Bus Speed                      Clock 0           100   100       100
12th Gen Intel Core i7-1260P     CPU Core #1                    Clock 1          4593   399      4693
12th Gen Intel Core i7-1260P     CPU Core #10                   Clock 10          998   399      3395
12th Gen Intel Core i7-1260P     CPU Core #11                   Clock 11         1997   399      3395
12th Gen Intel Core i7-1260P     CPU Core #12                   Clock 12          998   399      3395
12th Gen Intel Core i7-1260P     CPU Core #2                    Clock 2          2396   399      4693
12th Gen Intel Core i7-1260P     CPU Core #3                    Clock 3          2097   399      4693
12th Gen Intel Core i7-1260P     CPU Core #4                    Clock 4          1498   399      4693
12th Gen Intel Core i7-1260P     CPU Core #5                    Clock 5          1098   399      3395
12th Gen Intel Core i7-1260P     CPU Core #6                    Clock 6          1098   399      3395
12th Gen Intel Core i7-1260P     CPU Core #7                    Clock 7          1198   399      3395
12th Gen Intel Core i7-1260P     CPU Core #8                    Clock 8          1098   399      3395
12th Gen Intel Core i7-1260P     CPU Core #9                    Clock 9          1198   399      3395
12th Gen Intel Core i7-1260P     CPU Total                      Load 0              7     0        96
12th Gen Intel Core i7-1260P     CPU Core Max                   Load 1             20     1       100
12th Gen Intel Core i7-1260P     CPU Core #5                    Load 10            12     0       100
12th Gen Intel Core i7-1260P     CPU Core #6                    Load 11            10     0       100
12th Gen Intel Core i7-1260P     CPU Core #7                    Load 12             9     0       100
12th Gen Intel Core i7-1260P     CPU Core #8                    Load 13            11     0       100
12th Gen Intel Core i7-1260P     CPU Core #9                    Load 14            11     0       100
12th Gen Intel Core i7-1260P     CPU Core #10                   Load 15             8     0       100
12th Gen Intel Core i7-1260P     CPU Core #11                   Load 16             9     0       100
12th Gen Intel Core i7-1260P     CPU Core #12                   Load 17             9     0       100
12th Gen Intel Core i7-1260P     CPU Core #1 Thread #1          Load 2             20     0       100
12th Gen Intel Core i7-1260P     CPU Core #1 Thread #2          Load 3              0     0        94
12th Gen Intel Core i7-1260P     CPU Core #2 Thread #1          Load 4              7     0        95
12th Gen Intel Core i7-1260P     CPU Core #2 Thread #2          Load 5              0     0        97
12th Gen Intel Core i7-1260P     CPU Core #3 Thread #1          Load 6              5     0        99
12th Gen Intel Core i7-1260P     CPU Core #3 Thread #2          Load 7              0     0        97
12th Gen Intel Core i7-1260P     CPU Core #4 Thread #1          Load 8              6     0        95
12th Gen Intel Core i7-1260P     CPU Core #4 Thread #2          Load 9              0     0        97
12th Gen Intel Core i7-1260P     CPU Package                    Power 0            10     0        58
12th Gen Intel Core i7-1260P     CPU Cores                      Power 1             5     0        51
12th Gen Intel Core i7-1260P     CPU Memory                     Power 3             0     0         0
12th Gen Intel Core i7-1260P     CPU Core #1                    Temperature 0      47    23        98
12th Gen Intel Core i7-1260P     CPU Core #2                    Temperature 1      50    28        97
12th Gen Intel Core i7-1260P     CPU Core #11                   Temperature 10     47    23        85
12th Gen Intel Core i7-1260P     CPU Core #12                   Temperature 11     47    23        85
12th Gen Intel Core i7-1260P     CPU Package                    Temperature 12     57    30        98
12th Gen Intel Core i7-1260P     CPU Core #1 Distance to TjMax  Temperature 13     53     2        77
12th Gen Intel Core i7-1260P     CPU Core #2 Distance to TjMax  Temperature 14     50     3        72
12th Gen Intel Core i7-1260P     CPU Core #3 Distance to TjMax  Temperature 15     50     6        75
12th Gen Intel Core i7-1260P     CPU Core #4 Distance to TjMax  Temperature 16     51     4        75
12th Gen Intel Core i7-1260P     CPU Core #5 Distance to TjMax  Temperature 17     49    11        70
12th Gen Intel Core i7-1260P     CPU Core #6 Distance to TjMax  Temperature 18     43  
View on GitHub
GitHub Stars8
CategoryOperations
Updated2mo ago
Forks2

Languages

PowerShell

Security Score

90/100

Audited on Jan 8, 2026

No findings