Search notes:

PowerShell cmdLet Get-Volume

get-volume returns an instance of a Microsoft.Management.Infrastructure.CimInstance object.

Determine used space in a volume

The following demonstrates how the size and occupied space of a volumen (here: C:) can be calculated;
PS> $cDrv = get-volume c
"Size: $([math]::Round($cDrv.size / 1mb)) Mb`nFree: $([math]::Round($cDrv.sizeRemaining / 1mb)) Mb ($([math]::Round(100 / $cDrv.size * $cDrv.sizeRemaining, 1))%)"

See also

Powershell command noun: volume

Index