I finally got tired of the "MFT Fragmentation" monitor triggering all kinds of alerts, so I decided to start attempting to do something about it.
The script attached defragments a hard drive's Master File Table using a free utility called contig.exe (see http://technet.microsoft.com/en-us/sysinternals/bb897428
). Note that the labtech utilities pack includes an old version of contig.exe, which you'll need to update to the current version.
This script is a rough draft. I've done some internal testing, but don't have months of experience with this 'in the wild', so please be cautious and don't blame me if contig.exe breaks something. With some additional work and testing, this could probably be turned into an "autofix action" script.
Also, this is my first attempt at working with tickets and having them interact with a script. For some reason, I can't get the ticket to close itself automatically using the script. Any advice would be appreciated.