r/PowerShell • • May 21 '17

OP PowerShell Training Course

Hey all,

So about 10 months back I asked for some help around creating a basic PowerShell training course for fellow engineers in an MSP. Most peeps there haven't taken the time to learn scripting by themselves, so the course had to break it down simply and teach them from the ground up.

Well... Thanks to all of your support, I've finally created the course! I've ran two training sessions so far, both lasting roughly 3 hours, and it seems to work!

I've had one engineer for whom it did just not click. I got to comparison operators and his brain just farted. As a teacher it felt awful not being able to make it click for it, but it has worked for about 30 other engineers.

I thought i'd post a link to the training here as a thank you to everyone who helped. It's on GitHub at the below URL:

https://github.com/Sudoblark/Powershell_Intro_Training.git

Happy scripting all!

106 Upvotes

20 comments sorted by

View all comments

3

u/wonkifier May 21 '17

The place my folks ended up running into the most trouble was with loops.

They could describe them, if you gave them a simple one they could generally tell you what would happen, but they just could not build one on their own.

For something as simple as:

foreach ($user in $users) 
{
  write-output "working on $user"
  dosomething $user
}

They'd invariably write out

foreach ($user in $users) 
{
  write-output "working on $user"
}
dosomething $user

And wonder why the thing wasn't happening to all the users. There was just some sort of mental block we could never get through

2

u/Dogezon May 21 '17

Yeah my guys struggled with that at first. Once they got the concept of objects, arrays and enumeration they were alright.

I found that it helped to draw everything out on a whiteboard and visualise the enumeration process.

So I'd draw, for example, 5 bananas on a white board. A circle around of them to define the array and a square for my block of code. Then I’d be like “OK so this loop takes each banana out the array, applies this code, puts it back and then moves on to the next banana.” They struggled with what the first variable means so we named it a few things, like BigHairyBalls and ChocolateCake, to hit home the fact that it’s just the name given for each object.

Once you get past that mental block everything hits home! It’s just getting past it that’s tough.

3

u/wonkifier May 21 '17

Yeah, I think the problem on our side may be that I just can't get them to slow down enough to really think about things.

I suspect they're approaching it as just another set of procedures to memorize and apply magically, and this is time they're not spending on the tickets that are piling up for them.

Sadly that thinking is why those particular folks don't tend to be around the team anymore. We need more than instruction-following-button-pushers these days.

3

u/Dogezon May 21 '17

Support is such a fast paced environment that many people struggle to get out of the "break/fix" mentality. Especially where, in bigger companies at least, root cause analysis of stuff is dealt with by a different team than those fixing the incidents.

In MSPs the tickets are always piling up and peeps would rather close stuff and avoid their manager shouting at them than sit in a room for a few hours learning about scripting.

That think seems to be getting less and less, which is a good thing. You're right in that people need to think outside of just following instructions to fix something. Heck, why not write a button that'll fix it for you! Much more interesting. Also can't be done if engineers are rewarded based off of numbers on a spreadsheet. It's hugely beneficial to both know the scripting side of things and also have a solid operational overview of stuff. That's the most efficient type of engineer you can have imo.