March 17th, 2013

PowerTip: Use PowerShell to Identify SSD

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find a solid-state drive (SSD).

Hey, Scripting Guy! Question How can I use Windows PowerShell to find computers that have a solid-state drive (SSD)?

Hey, Scripting Guy! Answer In Windows 8, use the Get-Disk function, and search the model information for the letters SSD:

PS C:\> get-disk | ? model -match ‘ssd’

 

Number Friendly Name                            OperationalS  Total Size Partition

                                                tatus                    Style

—— ————-                            ————  ———- ———–

0      INTEL SSDSA2BW160G3L                     Online         149.05 GB GPT

Hey, Scripting Guy! Answer In Windows 7 and earlier, use the Get-WmiObject cmdlet and query the Win32_DiskDrive WMI class:

PS C:\> Get-WmiObject win32_diskdrive | where { $_.model -match ‘SSD’}

 

Partitions : 3

DeviceID   : \\.\PHYSICALDRIVE0

Model      : INTEL SSDSA2BW160G3L

Size       : 160039272960

Caption    : INTEL SSDSA2BW160G3L 

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.