Powershell with Database

i have a problem i am trying to use a script like Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceID, Temperature
to get temp of hard disk and output the script result to a mysql or sql server and display it ,whats the best approach to solve this.
would appreciate an help to solve this.



have a look at https://www.penflip.com/powershellorg/ditch-excel-making-historical-and-trend-reports-in-powershell. It covers getting PowerShell to talk to SQL Server and includes an example script module that does so.