The point of sysadmin scripting is to automate stupid and repetitive jobs. They are payed for that kind of programming.
Also, it can be viewed as kind of hacking -> word that is not popular in most of enterprise environments. You know it works, leave it alone :-)