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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s