SMART Disk Check 2.0
A "improvement" on the original SMART Disk check by Oscar Romero
This is a great script that is well written. I would recommend a few changes to improve performance and out of the box usability. 1. You are storing the results of the command as #smartstatus# in line 8, but then you go and check the file directly on lines 10, 17, 24, and 32. Why not just check the variable #smartstatus# that you already have in memory rather than performing 4 more reads of the file? 2. I would set the #email# variable in line 4 to #adminDefaults.adminEmail#, at least for script publication. 3. I would also set the script so that it only runs on Windows systems. I know this can be accomplished with a view and then tied to policy but why not have the script discriminate?
Does what I needed.
Matthew, thank you so much for this. I battled so much with the other script and this worked amazingly on the first try. This is one thing I really wanted us to have on our toolkit since it can save us so much time in avoiding a disaster. I had been meaning to test this since you shared it, but frankly, I was ready to spend a couple of hours on it and had to wait until things got slow for us. Thankfully I didn't have to do that but now I can spend that time implementing it. Can't thank you enough.
I was going to write one, but this is exactly what I was looking for. Thanks for saving me the time.
Great job here Matthew!
Thank you for your contribution to the community!
- Oscar Romero
Technical Success