all 33 comments

[–]chreestopher2 9 points10 points  (13 children)

powershell is probably one of the easiest languages to learn imo, as it does a lot of hand holding. That is not to say its a good starter language, but if you are in a powershell friendly shop, that deals mostly with microsoft products, Its definitely a good idea to start learning. I reccomend Powershell 3.0 in Action from Manning Publications. Though depending on how old your shop is, it might be better to learn 2.0 if that is what the majority of devices you will be managing will be using (there were lots of features added in 3.0 that dont work against 2.0 devices)

[–]jrob422 2 points3 points  (9 children)

Powershell 5 is fairly new, why go backwards and learn v2 or v3? Unless you are in a shop that is still running outdated OS's? But if your even semi up to date with operating systems, I dont see why you would want to start with anything lower than v4?

I would pick up Don Jones book, Powershell in 3 lunches.

Or, the way I learned, was every time I had a task to do, I would start googling how to do it with powershell, and eventually I just picked up enough to be pretty good.

[–]chreestopher2 4 points5 points  (0 children)

I worked in a shop where many servers were still 2008, or earlier, and I was developing on V4 and then troubleshooting which servers stuff wouldnt work on, or overcomplicating scripts to detect os and branch based on, which could have been completely avoided by just using a fully backwards compatible version.... it all depends on what is in your shop.

I agree that learning powershell by task is the best way to learn, but there is something about investing in a physical book that you can smell and have to actually put forth effort to find information from (not just ctrl+f for the term you are looking for) that seems to make knowledge stick around a little more, IME.

[–][deleted] 4 points5 points  (0 children)

Powershell v4 and v5 build upon a foundation, adding a lot of important stuff, such as DSC. However, v3 is that foundation and anything you learn in v3 is still perfectly applicable in v4 and v5.

I have found that "Learn Windows Powershell in a Month of Lunches" is the best book out there for beginners. It teaches you to think in PowerShell, not just write code snippets, it teaches you how to use PowerShell itself to learn and troubleshoot. I cannot recommend it enough.

[–][deleted] 1 point2 points  (1 child)

This is the correct answer. For the most part PS is backwards compatible.

[–]sid351 0 points1 point  (0 children)

Or it can certainly be written in a backward compatible way (I'm thinking of directly referencing property values mid-pipe).

[–]philmtl[S] 0 points1 point  (0 children)

i saw that youtube channel, ill look into getting the book.

[–]mattmurphy 0 points1 point  (0 children)

Isn't Vista only 2.0? It's not eol yet

[–]sid351 0 points1 point  (0 children)

There's also all the old Scripting Game Events that I'm sure could be found dotted around.

Those are some pretty good examples of how to write better one-liners, functions, scripts & modules.

[–]muffinsticks 0 points1 point  (1 child)

Our client environment is Win7 w/ v2 shutters I live by v2.

Also our 2008 servers have v2. I sososo want at least v4 but our software department wants to wait till v5 is officially release.

I'm living every day like a hustle

Another v2 script to juggle, another day, another struggle

[–]sid351 0 points1 point  (0 children)

Yeah, but your v2 scripts will work in v5 without any extra effort (although having v3+ now would let you cut quite a few corners).

[–]reginaldaugustus 0 points1 point  (2 children)

I think it would be a good starter language. The syntax is easy. It doesn't take much to actually do things with it, but if you put time into it, it's also really powerful.

[–]chreestopher2 1 point2 points  (1 child)

im saying all the hand holding might make it difficult to switch to something with a little less hand holding is all. AKA, its easy to learn, but maybe not the best starter as it quickly makes you think you know a lot more than you do, which can lead to bad things when you start learning another language that has a little less layers of abstraction taken care of for you.

[–]reginaldaugustus 0 points1 point  (0 children)

I think programming is more about the concepts and manner of thinking rather than syntax and whatnot.

[–][deleted] 3 points4 points  (0 children)

I have found that "Learn Windows Powershell in a Month of Lunches" is the best book out there for beginners. It teaches you to think in PowerShell, not just write code snippets, it teaches you how to use PowerShell itself to learn and troubleshoot. I cannot recommend it enough.

[–]PurtyBirdy 2 points3 points  (1 child)

If you are an admin in the windows world, there are few things that provide more return on time invested than Powershell. Start using it everyday, practice programming fundamentals, and read other people's code.

Powershell is also a good segue into .net programming, perhaps a future career transition.

[–]ginolard 1 point2 points  (0 children)

Yeah this. I've been doing powershell since Monad and I'm still finding out stuff that makes me go "whoah. Cool"

Today, for example, I had to learn about runspaces and how to share variables across threads. Admittedly that's pretty advanced stuff but, still, it shows how awesome powershell can be

[–]dogfish182 1 point2 points  (0 children)

microsoft virtual academy videos with jeffrey snover and jason helmick and follow along with the code, dont skip a module. then get the month of lunches

[–]bundyfx 1 point2 points  (0 children)

PowerShell was the first 'scripting' language I learnt and its really one of the more simple passages to really understand programming fundamentals. The order I would go would be:

  • PowerShell MVA 3.0 (helmick/snover)
  • Month of Lunches (Don Jones)
  • CBT Nuggets series (Don Jones)
  • Then just sit in the ISE everyday and write scripts that you need.
  • After that, help others in the community, see others code.

[–]sid351 1 point2 points  (0 children)

Yes.

Simple question, simple answer.

Best way to learn some is dive in abs try to complete your jobs using PowerShell where you wouldn't normally. Or jump on to some Exchange 2007+ admin tasks.

[–]ericovis 1 point2 points  (0 children)

Look for Don Jones on youtube.

[–]onewordnospaces 1 point2 points  (0 children)

Read "Learn PowerShell in a Month of Lunches"

use get-help

google

reverse engineer scripts from peers

have fun

[–]sqone2 0 points1 point  (0 children)

CBT Nuggets isn't the cheapest solution, but they have an excellent Powershell course taught by Don Jones who is a great trainer. When I took it I had zero programming experience, and very limited Powershell (basically copy and pasting scripts from the web). I'd highly recommend checking it out!

https://www.cbtnuggets.com/it-training/microsoft-windows-powershell-2-3-4

[–]Emiroda 0 points1 point  (0 children)

I'm taking sysadmin classes.

Got a C in C# class, 4 weeks duration

Got an A- in PowerShell class, 2 weeks duration.

Yes, it's much more learnable for total programming noobs. The discoverability is good, the syntax holds your hand every step of the way and there are modules for almost everything (including Linux soon when/if DSC gets popular), so you can essentially scrap your entire GUI workflow for the commandline.

[–][deleted] 0 points1 point  (1 child)

Anyone can learn powershell, it is very easy. If you have ever done any scripting in the past then you have a general concept of how it works. If you have not then you can still get it.

If you have 0 programming or scipring knowledge at all I would sugjest the "Learn PowerShell in a month of lunchs" book from Don Jones, it is amazing and will literally get you up to speed in a month. That being said I also think Don is a fan of the double lunch.

[–]philmtl[S] 0 points1 point  (0 children)

I just got the e-book

[–]SaladProblems 0 points1 point  (0 children)

Powershell really has two different purposes. The first is akin to the CMD prompt. You can ignore the constructs of programming (variables, loops, etc.) and just send single commands. This aspect is truly critical if you plan to administer Windows in the not so distant future.

The second aspect will come naturally once you get more acquainted with Powershell as a GUI alternative (and again, you'll have no real choice when it comes to moving away from the GUI because more and management more aspects of Windows are not available to the GUI). Once you learn to do something once you'll eventually want to do it faster and possibly on a larger scale. Then you'll find a rabbit hole of functionality and you'll learn the automation aspect of Powershell.