Powershell Windows Mount Point Free Space

I needed a quick script to monitor the free space on a cluster server using Windows Mount points. Here is the script:

Get-WmiObject win32_volume | 
Where-object {$_.DriveLetter -eq $null} | 
Select Name,Capacity,FreeSpace, 
@{Name="PctFree";Expression={ "{0:N2}" -f (($_.FreeSpace / $_.Capacity)*100)}}

Output

2014-12-01 08_23_43

Advertisements