quick post checking mount points with PowerShell

Having problems with my blog feed so this is just a temporary post.  I hope to get things fixed this weekend.  Does anyone know how to fix a blog feed that is bigger than 512k?

This code here will loop through a list of servers that you supply it in a text file and then spit out only the Mount Points on those servers that have less than 20% free space remaining on them.

foreach ($svr in get-content "C:\PowerShell\AllServers.txt")             
$svr; Get-WmiObject Win32_PerfFormattedData_PerfDisk_LogicalDisk -ComputerName $svr `
| where{$_.Name -ne "_Total" -and $_.PercentFreeSpace -lt 20} | select-object Name, PercentFreeSpace | format-list            

Please Share This:

You may also like:

One Response

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Subcribe to Blog Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

What I'm Saying on Twitter

Subscribe via feedburner