Using PowerShell it is easily to retrieve a nice overview of disk size (GB) and free disk space (GB) from multiple servers. With such a script it is possible to analyze trends in disk usage over a specified period.
Step 1
Create a directory (for example “C:\Log”) with a file called “Servers.txt” in it.
List all servers within the text file where you want to retrieve the disk usage from.
Step 2
Start PowerShell and run the PowerShell command as specified below.
Get-WmiObject Win32_LogicalDisk -filter “DriveType=3″ -computer (Get-Content .\Servers.txt) | Select SystemName,DeviceID,VolumeName,@{Name=”Size(GB)”;Expression={“{0:N1}” -f($_.size/1gb)}},@{Name=”FreeSpace(GB)”;Expression={“{0:N1}” -f($_.freespace/1gb)}} | Out-GridView
Step 3
You will get an overview of disk usage from all listed servers. From this grid you can cut and paste all the information into a spreadsheet to make alternate calculations and graphs.