Training

Why the HECK Do You Want to be Taught .NET in a PowerShell Class?!?!?!

3 min read
Share:

Ok, that post title is deliberately provocative. Twitter and all that.
So look, we’re designed this advanced PowerShell class. One of the top five constant suggestions I get whenever I say “advanced” and “PowerShell” is “.NET Framework.”
And I get it. When there’s no cmdlet, .NET has a ton of goodies that can solve a lot of problems. Maybe you don’t like turning to it, but you’ll do it if you have to.
My problem is, what’s that look like in a class?
I mean, for me, using .NET basically works like this:

  1. Spend hours on Google finding the .NET class that will do whatever I need done.
  2. Look up class documentation on MSDN.
  3. Fiddle around in PowerShell with properties and methods until I get what I want.

I can totally see a class making #2 and #3 a little easier. That’s just some basic experience, which is what a class helps build. The problem is, I can teach someone those steps in 30 minutes or less. The hard part is #1, and I truly don’t know any way to “teach” that. You’re either good at Google, or you aren’t. I certainly can’t provide some kind of mega-directory to the whole Framework - that’s what bloody Google or MSDN Search is for.
#3 can also be a hard part, because it requires you to know a bit about the underlying technology. It’s easy to use .NET to resolve DNS names to IP addresses - IF you know how DNS works. If you don’t, .NET is hard to use for that task. I can’t turn a PowerShell class into a “here’s how ____ works, so that I can show you how to do it in .NET.”
So everytime I try to teach .NET in a PowerShell class, I end up showing people how to read the MSDN documentation, execute methods in PowerShell, and look at properties in PowerShell. Kinda boring. I mean, they’re just freakin’ objects, right? Once you’ve grasped “objects,” isn’t .NET easy, assuming you’ve done #1 and found the class you need?
So if you were taking your dream class in “advanced PowerShell,” and you were all excited that it had a module on “Using .NET Framework,”  exactly what would that module look** like** ? What would you want to be TAUGHT?
Leave a comment. Tell me.
(By the way, if your answer to the question is, “I want to learn how to find what’s in the .NET Framework,” there’s no need to leave a comment - we all want that, I’ve just no clue how to teach it other than teaching you to be better at Google!)

Related Articles

Aug 20, 2019

A Peculiar Parse

 One of the best enhancements to Powershell was the inclusion of custom classes in v5. We originally wrote scripts, then we …

Read more
Jun 3, 2018

We Need Your Help.

We need your help. As you may have heard, we’re launching a new “OnRamp” track at PowerShell + DevOps Global Summit 2019. …

Read more