Script will read from a text file a list of computers which you want to identify the amount of free disk space on various logical volumes then email the report to an address you specify.  Only test on XP and Server 2003 but should also work for Vista, 2008, and 7

PowerShell
Edit|Remove
##########################################
###       http://blog.getbusinessconfident.com
###        Gather Disk Information     ###
##########################################

Clear-Content “C:\scripts\ps\driveSpaceScript\lowdisk.txt”

$color1 = "Blue"

$i = 0
$users = “emailaddress@na.com”, ”  Email Disk Space “

$computers = Get-Content “C:\scripts\ps\driveSpaceScript\computers.txt”

echo “ServerName	DriveLetter	DriveSize    Free Space    Percent Free” >> “C:\scripts\ps\driveSpaceScript\lowdisk.txt”
echo “———————	————		————		————		————” >> “C:\scripts\ps\driveSpaceScript\lowdisk.txt”


foreach ($computer in $computers)
{
 $drives = Get-WmiObject -ComputerName $computer Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3}
    foreach($drive in $drives)
{
        $size1 = $drive.size / 1GB
        $size = “{0:N2}” -f $size1
        $free1 = $drive.freespace / 1GB
        $free = “{0:N2}” -f $free1
        $ID = $drive.DeviceID
        $percentage = $free1 / $size1 * 100
        $b = “{0:N2}” -f $percentage


##############################################
##    Determine if any disks low    ##
##  Below, you'll need to add or amend the logical drives for which you would like to monitor
##  changing the value after -le will modify the percentage free space threshold for triggering an alert entry
##############################################


        if (($ID -eq “D:”) -or ($ID -eq “E:”) -or ($ID -eq “T:”) -or ($ID -eq “C:”) -and (($percentage -le 20) -and ($percentage -gt 0)))
        {

            echo “$computer        $ID            $size        $free        $b” >> “C:\scripts\ps\driveSpaceScript\lowdisk.txt”
            $i++
        }

    }

}


####################################################
##    Send Notification if alert $i is greater than zero ##
####################################################

if ($i -gt 0)

{
    foreach ($user in $users)
{
       echo “Sending Email notification to $user”

        $smtpServer = “smtp.mail.server”
		
        $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
        $emailFrom = “alertmailbox@na.com”
        $subject = “Critical Disk Space Alert”
		
        foreach ($line in Get-Content “C:\scripts\ps\driveSpaceScript\lowdisk.txt”)

{
            $body += “$line `n”
        }
        $smtp.Send($EmailFrom,$user,$subject,$body)
        $body = “”
    }
}