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_diskdriveBut 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?