Tag Archives: 10961A

Writing 10961A: The Damn Variables

When I wrote Microsoft course 10325A, their original 5-day Windows PowerShell course, I saved variables until Module 11. My thought at the time was to focus on teaching just what students needed for what they were about to do – and no more. “Just in time learning” can be effective, because it lets you immediately experiment with whatever you’ve just learned, and helps minimize the need to store up concepts for later use. I’d also had a lot of class experiences where bringing up variables too soon engaged a defensive mechanism in some students: “I’m not a programmer, variables are programming, and I’m shutting down right now.”

The biggest piece of MCT feedback from 10325A was, “don’t do that.” Trainers told me they were often teaching module 11 much sooner. Jeff Hicks had what I think is the best explanation for why: Without variables, you’re locked into the one-liner approach in PowerShell. While one-liners are neat, and effective, they aren’t always easy to read or to mentally de-construct. Using variables earlier in the course, Jeff argued, let you break things down into smaller logical chunks.

Now, one thing I’ve had to accept in writing 10961A is that I can’t please everyone. The feedback on 10325A is incredibly contradictory. Some MCTs want more programming, others want none at all. Some want classes to run 9am-4pm; others want 8am-6pm. Some want less content on the slides (actually, most wanted that). So what I decided to do is try and provide the material to accommodate what it felt like everyone was asking for, and rely on MCT’s ability to mix things up as needed for their classes.

(As an aside, I do think some MCTs jump into the “programming” aspect of PowerShell too quickly. It’s fine if you’ve got a room of people with programming experience, but it keeps students from learning some valuable fundamentals and turns the class into a “scripting” class awfully quickly. I’m not sure every MCT has done a really thorough cognitive analysis of their class results to determine if the programming-first approach is best; my experience with Month of Lunches readers suggest it isn’t.)

But I still didn’t want to do the full deep-dive on variables super-early in the course. So here’s what I think I’m doing: early in the course, you’ll be exposed to variables, in a very simplistic sense. They’re described as a named place to store objects, and used to de-construct a complex one-liner into a multi-line series of logical steps. Early in the course, I don’t go into naming rules, the double quotes tricks, or anything else. You learn exactly enough about variables for the task at hand – and no more.

In module 7, which is right before the module where you turn a command-line into a parameterized script, I cover variables more formally. I cover their rules, usage, double quotes, all that stuff. So you learn a wee bit about variables early, and then learn the full details later – just before you need to use variables more seriously in a script. So, keeping with the just-in-time learning.

The variables material is broken out into its own lesson in module 7, so an MCT hell-bent on teaching everything about variables right up-front can do so.While the feedback from 10325A suggests that MCTs think every course should be designed for the way they teach, I’m not sure they all realize how differently they all teach. The best I can do is provide the material in standalone chunks that MCTs can rearrange as needed. After all, the whole point of having a live instructor, as opposed to a recording, is the instructor’s ability to teach to your specific needs. So MCTs will have to be happy rearranging the material a bit as-needed; my outline is the recommnded approach that will work best across the broadest array of students, but it isn’t perfect for everyone. Nothing could be.

As a point of reference, 10961A doesn’t dive into scripting as deeply as 10325A did. PowerShell 3.0 has enough new, extra stuff that a 5-day course doesn’t allow for deep programming topics. You do take a command and walk it through to being a script module, so you see the range of scripting options, but you don’t practice them in depth. It’s inch-deep, mile-wide coverage of scripting, as opposed to something deeper and more focused. I’m hoping Microsoft can find budget for a full-on “scripting/toolmaking” class in the future, but 10961A ain’t it.

So… what do you think of this approach?


Writing 10961: Trademarks

Microsoft’s a big company, and that makes it a big target for lawsuits. We all know that. But what doesn’t always sink in is how careful the company has to be.

For example, in Microsoft Official Curriculum course 10961, Automating Administration with Windows PowerShell 3.0, I have to type Windows PowerShell every single time. I’ve actually been using “the shell” a lot, just to break things up a bit. We all casually refer to the shell as PowerShell, but Microsoft never does. Their trademark is on Windows PowerShell, and believe it or not someone has a trademark on PowerShell. I think it’s a sporting equipment manufacturer.

As I’m writing the course, I started using Windows PowerShell on first reference, and then naturally – for me, at least – used just PowerShell from then on. Nope. Had to go fix ‘em all.

Weird, huh?

I mean, technically… legally… you don’t trademark an entire word. You trademark it for use in a particular field. So it’s theoretically possible for Microsoft to own the trademark PowerShell in the world of computer software, and another company to own the same trademark for making backpacks or ski boots or whatever. But… I get it. You gotta be careful, and it’s easier just to not overlap with someone else’s trademark.

Maybe they should have named it FrabulouShellâ„¢ instead, just to be really sure.

Writing 10961: Remoting

As I write this, we’re close to sign-off on the outline of 10961A, which is a new 5-day Microsoft course on PowerShell v3. I sat down yesterday and starting doing some detailed-level design work on the proposed Module 9, which will cover PowerShell Remoting.

I love Remoting (and yes, I capitalize the “R” when referring to the specific feature, much as I would for Workflow). And although I’ve taught Remoting over and over and over since it was introduced in v2, although with this course I’m trying something a bit new.

I’m going to start by covering the basics: What Remoting is, what WS-MAN is (and yes, I know it’s formally called WS-Management, but you never see it referred to that way in-product), what WinRM is, and so on. I cover Invoke-Command and Enter-PSSession. Then I get into some advanced stuff, primarily covering how to pass arguments to Invoke-Command via its -ArgumentList parameter and an in-scriptblock Param() block. Surprisingly, this isn’t covered in the examples of Invoke-Command in the help. I was shocked to discover that. I need to use that technique in Module 10, so I’m covering it in 9.

Then I get into sessions, and I also cover disconnected sessions. Then the cool begins.

I cover both implicit remoting (which is tons easier to do in v3) and delegated administration via custom session configurations (also vastly easier in v3). In the penultimate lab for the module, students will create a Remoting endpoint that contains a single command (Set-ADAccountPassword), have that command run under Domain Admin credentials, and restrict the endpoint to members of a HelpDesk domain user group. Voila, delegated administration! We don’t go so far as to build a GUI tool atop it all, but that would be out of scope for this course. As-is, the lab covers an extremely real-world use of PowerShell and Remoting, and does it in a very practical and production-ready way. I think it’s gonna be awesome.

Writing 10961: The Ultimate Lab

My company has been contracted by Microsoft to design and author Microsoft Official Curriculum (MOC) course 10961A, Automating Administration with Windows PowerShell v3. While there is no announced release date I can share, I did want to share some of the experience.

As I write this, 10961A’s proposed outline is going through several review cycles. In the meantime, I wanted to sit down and start doing some detail-level design on some of the more complex labs in the course – the most complex of which is a proposed Module 10, consisting of little more than a big, 2-hour lab where you write a script to provision a newly installed Server Core computer.

This, for me, is the ultimate lab. It’s practical, meaning it focuses on a scenario that’s extremely real-world. It’s also not “perfect,” meaning it doesn’t throw you into an everything-just-works environment and hand-hold you though a few self-guided demos. Initiating communications between a domain client and a non-domain machine is tricky in PowerShell, and automating that is not entirely straightforward.

The approach I’m planning to take will break down all the major sub-tasks, and then walk students through some of the considerations for each. What commands will you need? What information will you need up front in order to run them? Where will you get that information – and how? I think it’ll be a very nice “putting it all together” module (although there are two modules after it, so it isn’t exactly the end of the course). It should occupy the entire afternoon of the course’s fourth day (Thursday), which makes for a nice open-ended wrap to that day (meaning faster students can finish and leave early, while leaving time for slower students to work through everything without feeling rushed).

In the lab, you’ll write a parameterized script that saves off your old Remoting TrustedHosts list, queries DHCP for the new server’s IP address, and saves that IP address into your TrustedHosts. You’ll make a Remoting connection to the new machine and have it join itself to the domain while renaming itself, wait for it to reboot, and then add a role (IIS) to it. You wrap by putting TrustedHosts back to where it came from.

This is actually a trimmed-down, more methodical version of a workshop I just did last week at Live! 360 in Orlando. That workshop took four hours, which I don’t have in the class’ time budget, so I trimmed out a few things that were cool, but not entirely necessary, such as testing to see if a DHCP reservation already exists before creating one (without testing, you can potentially get an error, but it’s non-tragic).

I’m looking forward to getting into the actual writing of the module once the outline is approved; I think this’ll really be the highlight of the course. It replaces a module in the older 10325A course (which I also wrote) where you break down a script someone else wrote, customizing it to run in your environment. While I think that’s a useful skill, the feedback I got was that it wasn’t the most interesting lab possible, and that the script I provided (written by Jeffery Hicks, actually) was pretty complex given the time allotted. This new lab provides the same beginning-to-end scripting opportunity, but hopefully folks will find it to be a lot more practical and useful, both educationally and when they get back to the office.