Learning path

PowerShell from zero

From your first command to filtering, sorting and your own function, with a cheat sheet and two tested scripts along the way.

Beginner to Intermediate · About 3 hours · 18 steps

This path takes you from never having opened PowerShell to writing a small function of your own. Most steps are Shell Lab exercises, so you type real commands in a console in your browser, and each one ticks itself off when you solve it.

Keep the cheat sheet open in another tab. Nobody remembers every parameter; good admins know where to look.

  1. Shell Lab · PowerShell · Meet PowerShellWhere am I?

    Commands are a verb and a noun. Start with the simplest one.

  2. Shell Lab · PowerShell · Meet PowerShellWhat can I run?

  3. Shell Lab · PowerShell · Meet PowerShellAsk for help

    Get-Help is the habit that makes everything else easier.

  4. Cheat sheetThe PowerShell cheat sheet

    Print it or keep it open while you work through the rest.

  5. Shell Lab · PowerShell · Finding your way aroundList your folder

  6. Shell Lab · PowerShell · Finding your way aroundRead a file

  7. Shell Lab · PowerShell · Finding your way aroundMove into a folder

  8. Shell Lab · PowerShell · Objects and variablesPick one property

    The pipeline passes objects, not text. This is the idea that makes PowerShell different.

  9. Shell Lab · PowerShell · Objects and variablesWhat is on this object?

  10. Shell Lab · PowerShell · Objects and variablesKeep it in a variable

  11. Shell Lab · PowerShell · Sorting and selectingChoose your columns

  12. Shell Lab · PowerShell · Sorting and selectingTop of the list

  13. Shell Lab · PowerShell · Filtering the pipelineTwo conditions at once

    Where-Object is how you ask for exactly the rows you want.

  14. Shell Lab · PowerShell · Grouping and countingHow many are running

  15. ScriptRead a real script: find the largest files

    Everything you have practised so far, used on a job you will actually have.

  16. Shell Lab · PowerShell · ScriptingDo something with each one

  17. Shell Lab · PowerShell · ScriptingWrite your own command

    Your first function. After this, you are scripting.