Take a look here : https://gallery.technet.microsoft.com/scriptcenter/Get-Disk-Space-using-69c88b59
Basic Code :
Write-Host "Getting Information for Drive : $DriveID for Computer : $CompName" # Get Info about the disk specified $Disk = Get-WMIObject Win32_LogicalDisk -ComputerName $CompName -Filter "DeviceID='$DriveID'" $FreeSpace = [System.Math]::Round((($Disk.FreeSpace) / 1GB)) Write-Host "Drive $DriveID has freespace : $FreeSpace GB"
The script can be improved using PS-Remoting for better performance.