How to Configure a Disk Space Monitor with Email Alert

Posted by Michael Mawhinney on November 17 2015 05:57 PM

You can configure a Windows Scheduled Task to trigger an email to you when the low disk space threshold is reached on your VPS or Dedicated server. You will need to download a program called sendEmail.exe to ensure reliable delivery.

  1. Download sendEmail (TLS Supported version) from
  2. Unzip the file you downloaded and copy sendEmail.exe to your server and place it in this folder path: C:\SendEmail\sendEmail.exe
  3. Open the Windows Task Scheduler (Click Start > Administrative Tools > Task Scheduler).
  4. Click Create a Basic Task.
  5. Enter a name and optionally a description and click Next. For example:
    Name: Low Disk Space Alert
    Description: This sends an email when disk space is low.
  6. Select the Trigger (that is, when you want the task to start) as When a specific event is logged. Click Next.
  7. Select System from the Log dropdown. Select Srv from the Source dropdown. Type 2013 in the Event ID field. Click Next.
  8. Select Start a program for the Action. Click Next.
  9. In the Program/script field, enter the path to sendEmail.exe: C:\SendEmail\sendEmail.exe
  10. In the Add arguments (optional) field, enter this text to actually send the email, changing the values where necessary:
    -f -t to@example -u "Low Disk Space Alert for" -m "There is low disk space on the server at" -s -xu -xp PaSsW0rD -o tls=yes
    The arguments are as follows:
    • -f : the From email address (should match the SMTP username below)
    • -t : the To email address (your email)
    • -u : the Email Subject
    • -m : the Email Body/Message
    • -s : your SMTP (sending) server address
    • -xu : your SMTP username
    • -xp : your SMTP password
    • -o tls=yes : ensures TLS is enabled if available
  11.  Click Finish to add the task. Now whenever a low disk space event occurs, an email will be sent to you.

By default, the low disk space threshold is 10%. If you want to change this value, you'll have to edit the Windows registry as follows:

  1. Click Start > Run > Type regedit and press Enter.
  2. Navigate to the following path: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parameters
  3. From the Edit menu, choose Add Value.
  4. Enter DiskSpaceThreshold in the Value Name field.
  5. Change the Data Type to REG_DWORD.
  6. Enter the desired percentage value in the Data field.
  7. Restart your VPS to apply the new threshold.

If you have any further questions that were not answered in this article, please contact us.

(12 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Copyright © 2016 HostMySite