I have blogged about a nice powershell that you can use to report on disk space on your servers and get nice alerts once a threshold is crossed.
Here is the link of the old version post : https://ammarhasayen.com/2013/09/22/216/
I am glad to share with you an advance version of the script (Version 2).
Download Version 2 of the script
Click here to download the script http://sdrv.ms/1bEdvy2
What is new in this version?
- General Bug fixes
- More informative error messages if any, when running the script interactively from the PowerShell console.
- Thresholds can be set also as percentage of the total disk space now. So you can say that an error free space threshold is when the disk space is dropped beyond 6% of the total disk space.
- Alert mode will send you email only when an error threshold is crossed. The alert email will only include the affected servers.
- New variable that you can customize is ($UsePercentage). If set to true, threshold values will be treated as percentages.
- Download the script, create a text file named list.txt with all servers to monitor (server per line), and place it on the script directory, modify the smtp settings and run the script from Powershell Console. Observe the results and then tweak the script thresholds accordingly.
- Always remember that you need to open the script and look at the script (Script Customization) section. Make sure you tune variables there to meet your environment.
- You need to place a text file named (list.txt) at the same path as the script location.The content of the file should be something like this
Give it a try, contact me if you have any questions or suggestions. Tell me what do you think.
Have a nice day.