Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Very simply I am trying to trigger an email alert from a Windows 2003 server to tell me when the disk space is low.

Has anyone had experience with setting this up?

Thank you.

share|improve this question
I actually just looked this link up for a friend. I have barely looked it through, but i think its what you want:… – artifex Jan 21 '10 at 12:23
Thank you very much. I'll check that out. :D – Arpanet Jan 21 '10 at 12:58
That article does look like it will do the job, but just a caveat: Windows XP\2003 has no native mechanism to send email alerts. You'll need a third party app or utility (as referenced in the article) to do that. – joeqwerty Jan 21 '10 at 13:08
@joeqwerty: actually, you can use the native CDO scripting interface to send email. Example here:… – Cawflands Jan 21 '10 at 17:41
True and not True. It still requires an SMTP server, which isn't native to W2K3 out of the box. Yes, you can install the SMTP server component, but then it's starting to become a project at that point. Thanks for the link, though. It's good to know an alternate method of getting the job done. – joeqwerty Jan 21 '10 at 18:38

Rather than creating an alert for just this one item you should consider setting up Nagios or similar. You can then have it monitor just about anything you like and alert you when something is outside your predefined parameters. The relatively small amount of time needed to set it up will be more than repaid by freeing you from having to manually monitor and check things.

share|improve this answer

Couple of options:

a) Install a monitoring agent (e.g. nsclient++) and have a monitoring system (e.g. Nagios) monitor it and alert you when disk space is low;

b) Create a scheduled task that triggers every minute, reads the appropriate WMI counter (e.g. \\LogicalDisk(C:)\\Free Megabytes) and sends a mail using the CDO.Message WScript object (example here:

share|improve this answer

+1 for nagios (or derivatives like opsview ) and nsclient++. If you know scripting, you can easily write your own custom plugins for anything you may need.

If you are not monitoring yet, start doing it now!

share|improve this answer

See here: Microsoft KB 324796

I use this in our environment and it's worked great. You do need an SMTP server to send the message, but it doesn't have to be the same box.

I do checks for Low Memory (checks every 5 min to see if free memory is lower than 100 MB), Processor Monitor (checks every 30 seconds to ensure processor is not running over 95%), and Low Disk Space (checks every 30 minutes that disk space is not below 20%). They are super easy to add and I've had no issues.

Here is the VBScript file I have for an alert about high CPU usage. You could modify the script to include credentials if necessary:

' Get command line parameters
Dim ArgObj
Set ArgObj = WScript.Arguments 
Dim strFrom, strTo, strSubject, strBody, strIPAddress
strFrom = "SERVERNA<E <>"
strTo = "RECIPIENT <>"
strSubject = "Automated CPU Alert from SERVERNAME"
strIPAddress = "IPADDRESS"

' get the body from the command line
If ArgObj.Count > 0 Then
strBody = ArgObj( 0 )

' if the subject is specified as an argument then add it
If ArgObj.Count > 1 Then
strSubject = ArgObj( 1 )
End If
strBody = "Default alert message body" 
End if

Call SendEmail( strFrom, strTo, strSubject, strBody )

' release memory
Set ArgObj = Nothing

' Sub-routing to send an e-mail using the CDO component
Sub SendEmail(sFromEmail, sToEmail, sSubject, sText )

Dim objMail
Set objMail = CreateObject( "CDO.Message" )
objMail.From = sFromEmail
objMail.To = sToEmail
objMail.Subject = sSubject

' Send using an SMTP server
objMail.Configuration.Fields.Item( "" ) = 2

' Name or IP of remote SMTP server
objMail.Configuration.Fields.Item( "" ) = strIPAddress

' Server port
objMail.Configuration.Fields.Item( "" ) = 25 

objMail.TextBody = sText

Set objMail = nothing

End Sub
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.