Learning PowerShell: What's Tough for You?

I'mteaching a class this week in Seattle, and thought it might be a good time to ask: What is, was, or has been difficult for you while learning Windows PowerShell? Using cmdlets? Writing functions? Figuring out snap-ins? Error handling? Scope? Drop a comment and tell me your most vexing PowerShell topic!

Discuss this Blog Entry 5

VAsHachiRoku (not verified)
on May 18, 2010
I never touched VB Script and starting off with PowerShell when I look over VB Scripters who write powershell scripts I hate their bad habits. I guess its the naming conventions of str or arr at the beginning. Most of the time those PowerShell scripts turn me off because I feel like I'm reading a VB Script. Normally I change all the variables to something more PowerShell like.
BartekB (not verified)
on May 18, 2010
1. Think objects - it's really hard to get rid off all text-based thinking that one had when playing with cmd or VBScript.
2. Help is really helpful - I always tend to forget how discoverable and helpful powershell itself is.
3. Scope for sure - never forget that if you won't tell powershell to hold vars and functions - it won't do it for you.
4. Try to think in powershell pipe-it way: don't do everything in a single script/ function, you do not have to. You can have ten functions that (with pipe) will eventually get what you needed. And if you change your mind - you can leave 9 and you are done. Something one could hardly do with cmd/ vbs.

Chris (not verified)
on May 19, 2010
Parameters in Powershell Version 2 Advanced functions seem to be confusing for me.

EricTravers (not verified)
on May 18, 2010
I'm not an Admin. Most of my VBScript code is for fetching data from SQL Server and using it to create reports in Excel with formatting, charts, pivot tables, etc. I thought it would be good to switch to Powershell to future proof my automation.

The hard part for me has been finding documentation to help with this transition. I wanted to switch to .Net instead of COM, but I can not find the information I need to switch.

Powershell is a great tool for Admins, but the rest of us want to use it as well.

unbob (not verified)
on Jun 11, 2010
This is really mundane, but. . .when is line continuation necessary and when is it optional? I tend to overuse it now, but I note that sometimes, when I forget the backtick at the end of the line, my code works anyway.

Also, I haven't quite gotten the hang of when flattening (in the Perl sense of list flattening) does and doesn't happen.

Outsida that. . .not much. I've used a wide variety of languages and most of the syntax and semantics of PowerShell seems pretty straightforward. I'm a little disappointed that lexical closures aren't the default for script blocks, but at least they're available.

Please or Register to post comments.

What's PowerShell with a Purpose Blog?

Don Jones demystifies Windows PowerShell.

Blog Archive

Sponsored Introduction Continue on to (or wait seconds) ×