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:
- Spend hours on Google finding the .NET class that will do whatever I need done.
- Look up class documentation on MSDN.
- 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!)