Created
April 7, 2024 22:28
-
-
Save kbarnes3/9b0114e4e491844a405a9b6d39afe464 to your computer and use it in GitHub Desktop.
Revisions
-
kbarnes3 created this gist
Apr 7, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Get-PhysicalDisk | Sort-Object -Property DeviceId | Format-Table DeviceId, FriendlyName, Model, @{Name="Size"; Expression={ $size = $_.Size; $postfixes = @( "B", "KB", "MB", "GB", "TB", "PB" ); for ($i=0; $size -ge 1024 -and $i -lt $postfixes.Length; $i++) { $size = $size / 1024; }; return "" + [System.Math]::Round($size,2) + " " + $postfixes[$i];}}, FirmwareVersion, SerialNumber, BusType, PhysicalLocation -Auto Get-PhysicalDisk | Get-StorageReliabilityCounter | Sort-Object DeviceId | ft DeviceId,*Laten*,Temp*,Power*,*Error*