Here is some code I use. Hope it helps.
$Drives = Get-WmiObject -Class Win32_Volume -ComputerName $InstanceName -Filter "DriveType = 3" | Where-Object { $_.Name -notlike "\\?\Volume*" } | Sort-Object Caption
$Drives = $Drives | SELECT @{n='ServerName';e={$_.__SERVER}}, @{Name='DriveType';e={$_.DriveType}}, @{n='DriveName';e={$_.Name}}, @{n='VolumeName';e={$_.Label}}, `
@{n='PercentFree';e={"{0:n2}" -f ($_.FreeSpace/$_.Capacity*100)}}, `
@{n='SizeGB' ;e={"{0:n2}" -f ($_.Capacity/1gb)}}, `
@{n='FreeSpaceGB';e={"{0:n2}" -f ($_.FreeSpace/1gb)}}, `
@{Name='Message';Expression={IF($_.Capacity) {""} ELSE {"Volume information is not available"} }}