50414 PowerShell v2 for Administrators

Written by Brian Mason on .

I just finished the 4-day long 50414 PowerShell v2 for Administrators session at Benchmark Learning Center in Bloomington and it was great.

Unlike so many MS classes where you get a fat book that has so little content that you just toss it out when the class is over, this one was lean and mean.  Evidently our own MNSCUG member, Lou Patrick wrote the session.  From what I heard, it’s undergone a few revisions (like from 3 days to 4).  What’s great about it starts with the title of the course.  It’s not tailored to programmers, developers, etc., but rather to admins who would just like to automate some tasks where the GUI just can’t compete.

For example, a friend (Mac owner) sent me a bunch of files and when I expand them I see lots of hidden files with a dot at the beginning of the name.  Some sort of Mac dirt left over.  To manually open 25 folders and highlight all these hidden files and delete them would take a long time.  But in PowerShell, it can take just a second with one line:

Get-ChildItem S:\Photos\New\Derek -Recurse -Force | where {$_.mode -match "h"} | Remove-Item –Force

Now think of adding a bunch of subnets to AD Sites using the GUI and how long would it take compared to something like this.  And unlike VB, the commands are so powerful that many tasks can be completed it just a line or two.  That is where this course concentrated efforts – in getting the student to be able to figure out common functions using the built in help files and examples.

My instructor was John Thurow who I know I’ve had in the past, but I can’t recall just what it was.  What he did great was keep asking us if we were keeping up and encouraged questions because if we were to get behind, it’d be almost impossible to catch up since each module is built off previous work.  John also took a couple modules straight out of the book and condensed them into sample files we opened in the PowerShell ISE to walk through step by step, and he littered them with comments so they’ll make a great resource to go back to.  We could cover ground a lot faster that way than just reading a book.

So things moved pretty quickly for just 4 days.  I feel pretty comfortable about reading basic scripts and knowing what they do.  It takes me quite a while to piece together just the right syntax, but I hope over time that repetition will help make it sink in for me.

PowerShell seems to draw a lot on other scripting languages, pulling in many of the best parts of all them.  I could go back to work and use PSTools and the command box, and SQL queries, and a mix of VB scripts, or I could just learn to concentrate all efforts on PowerShell from now on.

Anyway, I obviously recommend this course (not just learning PowerShell, but this course).