This is the first in series of posts about learning to explore and help yourself with PowerShell. As more installments are added they will be linked here.

  1. Exploring with Get-Command
  2. Getting the most out of Get-Help
  3. Spotlight on Get-Member

Matt and I have nearly 20 years of using PowerShell under our belts at this point, and have had the pleasure of helping drive the adoption of the language where we work, and helping out people new to PowerShell in getting started. My mantra with new people is generally summed up with:

To become proficient in PowerShell, you only need to know 4* commands.

  • Get-Help
  • Get-Command
  • Get-Member
  • Show-Command

* This used to only be 3 commands, but Show-Command has proven to be incredibly useful as a teaching and exploration tool.

Show-Command

In subsequent posts, I’ll dive into each of those commands in greater detail. This post is largely about learning to get help - a skill that transcends programming or scripting. No one ever starts learning a new skill and is immediately an expert. Sometimes you won’t know how to ask the question, because you don’t have the experience to know what it is that you don’t know. Have faith! It takes a lot of failure and deliberate practice to learn to do anything.

Where do I Even Start?

I don't even know

Perhaps counterintuitively, if you’re just starting out, you might benefit from some reading on how to learn a new skill, and how to ask questions effectively, so I present to you:

  1. How to ask questions
  2. The Importance of Deep Work & the 30-hour Method for Learning a New Skill

Ok, But Where do I Start with PowerShell?

Basic information you’re going to need to get started with PowerShell:

  1. All commands follow a Verb-Noun naming structure: Verb-Noun
  2. There’s a list of approved verbs. You can find them online or with Get-Verb
  3. There isn’t a list of approved nouns ;)
  4. The 4 commands mentioned above (Get-Help, Get-Command, Get-Member, Show-Command)
  5. PowerShell help files aren’t installed locally by default, use the -Online switch for Get-Help when starting out

Armed with that knowledge, the PowerShell ISE (the ISE is a script editor installed by default with PowerShell), and a can-do attitude, you’ll get pretty far.

Some other very useful resources include:

  1. https://powershell.org
  2. https://blogs.msdn.microsoft.com/powershell/
  3. http://www.powershellmagazine.com/
  4. https://powershell.org/forums/
  5. https://reddit.com/r/powershell
  6. http://ramblingcookiemonster.github.io/
  7. http://mikefrobbins.com/

People to follow on Twitter (if you’re not already using twitter, I can’t recommend it enough for keeping up with PowerShell developments, and getting help) - a non-exhaustive list:

  1. Jeffrey Snover
  2. Lee Holmes
  3. The PowerShell Team
  4. PowerShell Magazine
  5. Warren F.
  6. Mike F. Robbins
  7. PowerShell Tips
  8. Don Jones

Finally

Don’t be afraid to experiment. Don’t be afraid to fail. Don’t be afraid to ask questions. There are people out there that seem to think that we’re all born with the innate knowledge to solve our every problem on our own, but that’s just not the case. Try not to get discouraged while you’re learning.