You may use the script below to query the drive letters, drive sizes, and the amount of free space on each drive in gigabytes (GB) for the local host.
This script will provide the drive letter, drive size and free space of the local server.
This script will automate the process of providing the drive letter, drive size and free space of the local server.
Written by Noel Enrique Alvarez on Wednesday, March 23, 2016.
#Provide the hard drive information for the local server
Get-WmiObject Win32_LogicalDisk -Filter ‘DriveType = 3′ `
| select SystemName, DeviceID,