Get disk space warnings through PowerShell

Credits Susan NYC
I use powershell scripts for disk free space monitoring on servers. Following are the task performed by the script:
  • Clears the content of D:\lowdisk.txt.
  • Adds required headers to D:\lowdisk.txt.
  • Checks through all drives if free disk space is less than specified threshold.
  • If a disk has free space less than threshold then adds info to D:\lowdisk.txt.
  • Mails to users the contents of the  D:\lowdisk.txt if any disk is having free space less than threshold.
To know how to execute the PowerShell scripts go to Executing a PowerShell script.
Following is the code for the script. You can schedule it using windows scheduler.

Comments

Make Money from Surveys

Popular posts from this blog

Schema.Object has an unresolved reference to Schema

The current master key cannot be decrypted

There is insufficient memory available in the buffer pool