PowerShell for SMART

In this blog, PowerShell for SMART, I will guide you through the use of SMART via PowerShell. SMART: Self-Monitoring, Analysis, and Reporting Technology. This is a monitoring system included in computer hard drives (HDDs) and solid-state drives (SSDs). The primary function is to detect and report various indicators of drive reliability, with the goal of anticipating failures. Let us take a look at what it is.

I my previous post, which you can find here, I talked about accessing SMART through the command prompt. In that same post I talked about what SMART is, and why it does not hurt in giving it a try.

Windows Power Shell

You can also use PowerShell for a slightly more detailed report.
In the search bar type “powers”.

powershell for smart start powershell

When the results appear, select “Run as administrator”.
A message asking “Do you want to allow…” appears, select Yes.

launch power shell as administrator

The PowerShell opens, type
Get-WmiObject -Query “SELECT * FROM Win32_DiskDrive” | Select-Object Model,Status
and press “enter”.

get status

This command provides the model of your drive along with its status.

Other options

Get full disk information

Get-WmiObject -Class Win32_DiskDrive | Select-Object *

This retrieves all available information for each disk drive.

powershell for smart get full disk info

As you can see, this is a nice readable format.

Get detailed SMART information

Get-WmiObject -Namespace “root\wmi” -Class MSStorageDriver_FailurePredictStatus

This retrieves detailed SMART status information.

get detailed smart information

Get disk partitions

Get-WmiObject -Class Win32_DiskPartition | Select-Object *

This command lists all disk partitions along with their details.

get disk partitions

Get physical media information

Get-WmiObject -Class Win32_PhysicalMedia | Select-Object *

This provides information about the physical media, such as the serial number.

get physical media info

Get logical disk information

Get-WmiObject -Class Win32_LogicalDisk | Select-Object *

This lists logical disks (partitions) and includes details such as the file system and free space.

powershell for smart get logical disk info

Check disk drive capabilities

Get-WmiObject -Class Win32_DiskDrive | Select-Object Capabilities,CapabilityDescriptions

This provides information about the capabilities of the disk drive (if it supports SMART, if it can be removed, etc).

check disk drive capabilities

Using third-party tools

CrystalDiskInfo: A free tool that provides detailed SMART data for all your drives.

HDDScan: A free utility that allows you to run SMART tests and view detailed reports.

Speccy: A system information tool from Piriform that also shows SMART data.

The only way to run a short test or an extended test is via Third-party tools.

Conclusion

Built into the Drive, SMART is part of the drive’s firmware, meaning the monitoring and data collection are handled internally by the drive itself. It is accessible via the operating system or via third-party tools. SMART runs in the background automatically as long as the drive is in use, and collects data continuously. You can initiate manual SMART tests using tools that tap into the drive’s SMART capabilities. While SMART is embedded in the drive, you can easily access and monitor it through Windows using built-in commands or more detailed third-party tools.

This brings us to the end of my post on PowerShell for SMART .

Thank you for taking the time to read my post on PowerShell for SMART.
I hope you found it enjoyable and insightful.
Stay tuned for more content that is coming soon.

If you like what you read, please consider sharing it with others who might find it helpful.

Contact me

If you have any questions or want to contact me, please drop me an email at info@safecomputer.org

Disclaimer

All tips and methods mentioned in this blog are tested on Windows 11. Please note that results may vary on other operating systems or versions of Windows. Adapt the instructions accordingly.

Copyright

© 2024 Henny Staas/safecomputer.org. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Henny Staas/safecomputer.org with appropriate and specific direction to the original content.