Friday, February 7, 2014

Scripting for Administrators

There is a long standing feud, thanks to Microsoft, between GUI based administrators and command line administrators. Let's face it, a true IT Jedi will want to use scripts and the command line to perform ALL of the tasks for their job. Unfortunately Microsoft thought it would be a good idea for Server operating systems to utilize GUI based tools to perform essential administrative tasks. Albeit this is convenient, it is certainly not ideal when you have to perform the same task on twenty servers, however scripting is. One thing that has irked me about Microsoft is that I've found that there are functions that can not be done in their GUI's, but MUST be done at the command line. So, if you're going to route me to the command line for some things, why not do it for all things? The other issue is that GUI's tend to change look from one version of Windows to the next. Command line options typically never change. So, while it may be a slightly steeper learning curve, the knowledge you learn is less transient than your GUI knowledge. I have started using Powershell for Windows Server and SQL Server administration whenever possible and Perl for Oracle Database administration. (Although, as a database administrator I also have t-sql / pl sql at my disposal as well) So the next time you perform a task, start to think about whether or not you could have scripted or automated the task. Here are the benefits:

  • I have a terrible memory, compartmentalizing tasks to different scripts allows me to forget a lot and still get things done.
  • I like to sleep at night. On the weekends I love to sleep in. With a script you can automatically perform certain actions based on the time or system events. So my minion script will do work for me while I'm snuggled cozily with a blanket.
  • Repetition is boring and will likely give me carpal tunnel syndrome. If I figure out a scripted solution once it may save me from many reiterations of a manual task.
  • You'll begin to think in algorithms more which will allow you to understand how computers function.
  • Once a script is complete you can perform the same tasks on hundreds of systems in a matter of minutes while doing the same task manually may take you days or weeks.
  • An administrator that has some knowledge of task automation is much more valuable to any potential employer.
  • Finding new things to automate brings a new level of excitement and interest to working in IT.

No comments:

Post a Comment