You may use the script below to query a list of remote servers for their drive letters, drive sizes, and the amount of free space on each drive in gigabytes (GB).
This script will provide the drive letter, drive size and free space of a list of servers.
This script will automate the process of providing the drive letter, drive size and free space of a list of servers.
Written by Noel Enrique Alvarez on Wednesday, March 23, 2016.
#Provide the hard drive information for the servers in the Remote_Servers.txt file
$Computers = Get-Content “<<<INSERT PATH>>>\Remote_Servers.txt”
gwmi Win32_LogicalDisk -Computer $Computers -Filter ‘DriveType = 3′ `
| select SystemName, DeviceID,