Learning

I want to get really good at powershell. I’ve got Don’s great books, “month of lunches” and “in depth”. I’m watching some Don’s videos on YouTube and the jumpstart videos on Microsoft.
But it’s all very daunting and when I want to practice not sure what you try and don’t learn ! I try and do at least 30mins a day learning.
Does anyone have any tips on learning? How did you all get to grips with powershell. Finding it frustrating as I want to be good with it.

Personally i would say at minimum increase the 30mins to at least 1 hour.

Find yourself a project. Perhaps you want to automate vmware and building a new VM for example or something easier such as pulling out various information for any computer. You could write single lines to get RAM, CPU, BIOS etc… Data

Then try make it into a function, followed by parametrising, then look at how to handle errors if someone gives the wrong input etc…

Start small very small and build it up with the info you are learning from the book.

Learning something new causes fustration, you need to battle through it and things will get easier - just like anything.

Hey Graham,

I found the best way for me to learn was by trying to ‘PowerShellize’ existing stuff I’d written in vbscript and batch files, and getting involved with the community.

I’m a big fan of the mucking around approach. You’ve got to have fun, otherwise it’s not worth it. Maybe if you can approach old vbscript/batch scripts that you’ve done already, then it’ll give you a familiarity which makes it more fun while trying to learn how to do the same in PowerShell. It also doubles the buzz you get when it working in PS! Then you find youself thinking ‘if i can do that in PowerShell, then maybe I can…’, and it will build up.

I agree with Adnan up there. I started with a problem I needed to solve and I thought, I’ll try to solve this with powershell! Could I have solved it with a different language? Sure. Manually? Sure. But after I put in the time and effort with Powershell, it was much more satisfying.
My advice is: find a need, and fulfill it with powershell. That could be a problem that needs solving, a tool that will benefit others, including yourself, etc. And always, Just have fun with it! Take small steps, and dont overwhelm yourself!

I agree with the guys above and add one tidbit. I started opening a ISE session when I log in at work in the morning, and attempt to do as much as possible via Powershell rather than gui.
The things that have a long or counter intuitive parameter set, I copy up to the script pane in a file I call “bits-n-pieces” . That’s just a file of one liners meant to be tweaked and run manually and individually.
Those are the basis of most of my scripts/functions. Sort of a “gee I’m running this one line of code every day! perhaps we can automate this” sort of thought process.

I’ve found that helps getting comfortable with the shell, which in turn opens up ideas for projects.

Hello Graham,
As with learning anything it is best to immerse yourself in the topic. Reading something and not doing anything with it for a few weeks is not very helpful and that also applies to PowerShell. A few things you could do:
[ol]Write scripts, if you need some inspiration for scripts I recommend looking into the old scripting games there are a lot of assignments and if you start doing them now you have the benefit of being able to access the expert explanations while writing them.[/ol]
[ol]Frequent forums to see how others are using PowerShell as there are always uses[/ol]
[ol]Keep up to date by reading blogs or watching youtube videos on PowerShell[/ol]

I recently wrote a blog post on learning PowerShell, perhaps it is useful to you:
How to learn PowerShell

Great, thank you everyone.

I second Jaap’s suggestions. “The Scripting Games” have helped push me along in my learning PowerShell. I have gone back and worked through the beginner and advanced events for the past few years. The questions are posed and answered so you can see how your result compares to the judges method of solving the event. This has exposed me to some new ways of understanding and solving the problems.

I also have a project I am trudging through and this forum has been invaluable in answering my questions and pushing me along the PowerShell path.

Thanks Rich. Really useful advice. I’ll take a look at the scripting games. It’s getting an understanding of ways to do things and when they should be used.

Yes the scripting games are especially good for that, because of the expert commentary you get for each of the exercises. It is a great exercise to improve your scripting in a structured way, just work through the exercises on a pace that works for you and be sure to compare what you have written against what the experts have written. It is a great way to learn while putting what your learned to practice.

I can find the expert commentary but not the exercises, are they in the same place ? Chances are its me missing them !

Another thing to understand is that it’s going to take time. I’m sure I speak for us all that if we look at a script we wrote a year or even a couple months ago, you’d be like “Why did I do it the hard way?” I follow several people on Twitter that post Powershell blogs and try to take time to read them to get little bits of information so that when I look at that year old script, I have more “feathers in my cap” by continually learning. Another great thing is forums just like this, someone says I have problem X and I respond with “the best way is y” and someone else says, “An even better way is Z”. Then you can see multiple solutions to the same issue and hopefully understand why one is more efficient or a better solution than the other. Don’t know if you are new to technology, but many of us have written batch, vbScript and other scripting formats for years, personally I started scripting around Y2K. Just keep learning and writing scripts and you’ll be an expert before you know it.

Thanks Rob, i do get frustrated i don’t know more already and i’ve only been going 3 weeks for so. This forum is great, so many helpful and clever people. I wish i was at the level of some of these guys !

I fully agree with Rob Simmers, this is also one of the things I particularly enjoy about going to PowerShell User Group meetings. Every time I go I know I will be in a room of people and no matter if they are experts or beginners everyone most likely has at least one trick or cool feature that I have never heard of. So if you have any user groups in your area I would highly recommend joining them.

So about the PowerShell Scripting games, have a look at the following links:

  • 2010 Scripting Games: All Links on One Page
  • 2011 Scripting Games: All Links on One Page
  • 2012 Windows PowerShell Scripting Games: All Links on One Page
  • It’s like it says, exercises, experts commentary, solutions: All the links on one page.