$disk = Get-WmiObject Win32_LogicalDisk -ComputerName myServer -Filter "DeviceID='D:'" | Select-Object Size,FreeSpace $disk.Size / (1024*1024*1024) $disk.FreeSpace / (1024*1024*1024)