Tuesday, October 31, 2006

Scripts: Why more SBSers should be writing scripts!

Right to the point…

More SBSers should be writing scripts!

In the past I’ve posted snippets from a number of scripts that I’ve written… from checking Antivirus definition dates, to detecting Virtual Servers, to calculating free space, to querying for FSMO roles… (all right, so that last one isn’t exactly a common need for the average SBSer). But in case I haven’t made it abundantly clear already…

Scripting rocks!

Now I know what you’re thinking, and I’ve heard the excuses, scripting is… too hard, too time consuming, or even the wrong tool for the job in the SBS world. If that sounds anything like you, then let me let you in on a little secret... you don’t have to be a programmer to write useful scripts. You don’t even have to do it on a regular basis… you just need some exposure! Personally, between the stuff that I’ve already written and the community resources that are available, I don’t have to re-invent the wheel very often.

What I like to do is start with something simple, and write a small single-purpose script. Then maybe a few weeks later I come across another need, and write another single-purpose script to handle that task. After doing so, I’ll combine both of those scripts to handle some more complicated task. And that’s how my tool kit grows… I keep writing these little one-off scripts, and incorporating them as subs or functions into more complicated tools. It all keeps building.

Now go and get started… look at what’s available on the Scriptcenter, find something that you want to be able to do… maybe you want to bounce the Print Spooler, or something like that… then mash a few of their scripts together until they do more useful things for you. After you’ve done that… start tweaking… write another script to email you when an event happens… then add that email script as a sub or a function to the script that you created to bounce the print spooler… and just keep growing your tool set.

Remember, you don’t have to be a programmer, and you don’t have to crank out new scripts every day to add-value. Scripting is just another useful tool in your arsenal.

No comments: