![]() # Check disk space and send an HTML report as the body of an email. This article explains how to run a script using task scheduler. ![]() Once script seems to work fine, then it can be scheduled to run everyday or every hour based on requirement using windows task scheduler. If on the same machine then use "localhost" (smtp server must be functional).Īfter the script is saved in local drive, it can be easily run using powershell and tested. Just replace the name of smtp server name with that of your server. You can use this script to send an email using your email server. ![]() When the entry does not exist, the default value is 10. To configure when the low disk space event is recorded in the System Log, open the Registry Editor, navigate to HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters and add a DWORD value named “DiskSpaceThreshold”, setting it to the desired percentage.Set Action to "Send an e-mail" and fill in the rest of the settings appropriately.Set Log to "System", Source to "srv", and Event ID to "2013".Select "On an event" in the "Begin the task" box.Enter a name for the task, select "Run whether user is logged on or not", and check "Do not store password.".Open Task Scheduler and create a new task. ![]() If the free space falls below the percentage specified in HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\ DiskSpaceThreshold, an event is recorded in the System Log that can trigger a task to send an e-mail message. One simple way to get Windows Server 2008 to send low disk space e-mail alerts is to use Task Scheduler and the System Log. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |