20090206 perl weapon of choice for serious system administration - plembo/onemoretech GitHub Wiki

title: Perl: Weapon of Choice for Serious System Administration link: https://onemoretech.wordpress.com/2009/02/06/perl-weapon-of-choice-for-serious-system-administration/ author: lembobro description: post_id: 384 created: 2009/02/06 18:02:58 created_gmt: 2009/02/06 18:02:58 comment_status: open post_name: perl-weapon-of-choice-for-serious-system-administration status: publish post_type: post

Perl: Weapon of Choice for Serious System Administration

Rob Kimball and I were scouring the web today looking for an example VBScript that showed how to bind to and search a third party (non-Microsoft) LDAP directory. We’d already been up on Robbie Allen’s Tech Tasks and came up empty, so we knew we were pretty much toast. Rob’s done a lot of independent research on using VBScript for common administrative tasks, to the point of actually going in and spelunking down into the black hole that is Microsoft’s nearly indecipherable documentation on the language. Which shows the real value of having someone with a C.S. (Computer Science) degree on the team. After a couple of hours Rob was able to piece together the solution on his own, which should be published on the eldapino blog soon.

In the course of this exercise an old article by Robbie Allen entitled VBScript or Perl?, caught my eye. It’s a thoughtful, articulate piece on the pros and cons of using either language for Windows system administration. While he gives a well-reasoned explanation for his own decision to use only VBScript in his Windows admin books for O’Reilly, his final conclusion is worth quoting:

If you want to get serious about automation in the Windows environment, I recommend using Perl because of its extensive module support and the overall robustness of the language. If you only want to do something quick and dirty or you don’t have any programming experience, VBScript is probably your better bet.

Although I heartily agree with his ultimate endorsement of perl for “serious” automation on a Windows network, his recommendation of VBScript for “quick and dirty” task or for those without programming experience has me a little puzzled. As a bona fide non-C.S. degree holder with no formal training in programming past High School (we studied GE BASIC), I found perl much more accessible as a beginner than VBScript. In fact, as I reflected on this it occurred to me that the failure of most Windows system administrators to take full advantage of scripting for everyday tasks is probably due to the fact that VBScript is the language most of them are presented with as the best tool for the job. As a result, I’m going to suggest to anyone, especially on the Windows side, who has tried scripting with VBScript but found it too “daunting” give perl a try. Robbie Allen’s own Tech Tasks site has a wealth of scripts for common admin tasks written in both VBScript and perl, and so provides a terrific tool for transitioning between these languages. O’Reilly’s Learning Perl is a very good introduction to the language, and the Perl Cookbook provides a library of scripts that administrators will find useful for all sorts of applications.

Copyright 2004-2019 Phil Lembo