Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to correlate SMART status with drive letter?

$
0
0

I'm trying to manage direct-attached disks with these Cmdlets:

Get-WmiObject -Namespace root\wmi –class MSStorageDriver_FailurePredictStatus |
 Select InstanceName, PredictFailure

Get-WmiObject Win32_LogicalDisk | 
Where-Object -Property DriveType -eq -Value "3" | 
ForEach-Object { $_.DeviceID, "{0:N1}" -f ($_.FreeSpace/1gb.ToString()) }

gwmi win32_diskdrive

But I'm missing a way to combine the output of these Cmdlets.  I'm trying to get output that looks like this:

C: 323.7 GB Free ATA ST500DM002-1BD14 SCSI Disk Device PredictFailure False

The missing link is a common identifier for the disk.  Is there a GUID I can use which is a property of each class?



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>