defrag

Powershell command to monitor disk fragmentation level using Zabbix

I love zabbix a lot because of its ease of use and the simplicity of the configuration when it comes to monitoring anything. I recently added a monitor to check the fragmentation level of volumes on a machine once a week and set it to trigger an alert when the fragmentation level reaches the set threshold. I wrote a simple command line statement that would run the defrag check and output just the value.