Here's what I came up with...you'll want to adjust depending on what you want to see.
$diskReport = @{}
Get-NcDisk | %{
$diskCapacity = ConvertTo-FormattedNumber ($_.DiskInventoryInfo.BytesPerSector * $_.DiskInventoryInfo.RightSizeSectors)
$id = "$($_.DiskInventoryInfo.DiskType)_$($diskCapacity)"
if ($diskReport.Keys -notcontains $id) {
$diskReport.$($id) = @{ 'Capacity' = 0; 'Count' = 0; }
}
$diskReport.$($id).Capacity += $_.Capacity
$diskReport.$($id).Count++
}
$diskReport.GetEnumerator() | Select @{'N'="DiskType";'E'={ $_.Name }}, @{'N'="TotalRawCapacity";'E'={ ConvertTo-FormattedNumber $_.Value.Capacity }},@{'N'="Count";'E'={ ConvertTo-FormattedNumber $_.Value.Count }}
This will show the disk type (SAS, SSD, SATA) and the right size value as a single field, e.g. "SAS_1T", along with the total raw capacity of the disk type in the system and the count.
DiskType TotalRawCapacity Count
-------- ---------------- -----
SAS_445G 43T 96
SAS_1T 49T 40
SSD_406G 3T 8
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.