Loading

from first concept to confident practice

PowerShell

Automate anything with a shell that pipes objects, not text.

Start learning 25 lessons · first lesson about 20 min · free · no account needed
About this track

PowerShell is the command line and scripting language behind Windows, Azure and Microsoft 365 administration - and it runs on macOS and Linux too. Instead of passing text between commands, it passes objects, so sorting, filtering and reporting need no text surgery at all.

You’re the new automation keeper at Emberfall Dragon Sanctuary. You’ll learn Verb-Noun cmdlets and how to discover any command, explore objects with Get-Member, manage files, then build object pipelines with Where-Object, Sort-Object and Group-Object. You’ll format text, import and export CSV and JSON, write scripts with variables, hashtables, loops, functions and modules, handle errors, automate safely with -WhatIf, and meet the best of PowerShell 7. Then you’ll pick up power tools - script blocks and scope, your own classes and enums, dates and durations, and .NET collections and regular expressions - and put PowerShell to work in the real world: looking after computers, calling web APIs, reading XML, testing with Pester and debugging. Along the way you’ll build pipelines object by object, sort out approved verbs, and review a risky script. Exercises run real PowerShell in your browser, and the capstone has you build the sanctuary’s feeding report.

Before you start
  • No PowerShell or programming experience is required.
  • A modern browser with JavaScript enabled. To practice locally, install PowerShell 7 (`pwsh`) on Windows, macOS or Linux.
  1. Unit 1 · 0/4 lessons

    PowerShell foundations

    Run cmdlets, discover commands and help, explore objects, and manage files. Badge: Cmdlet caller

    1. 0x001Meet PowerShellLearn what PowerShell is, how its Verb-Noun commands work, and print your first output. 20 min 0/2 exercises solved 20 min 0/2 exercises solved
    2. 0x102Discover commands and helpFind any command with Get-Command, learn it with Get-Help, and master parameters and aliases. 22 min 0/2 exercises solved 22 min 0/2 exercises solved
    3. 0x203Everything is an objectInspect objects with Get-Member, use their properties and methods, and build your own. 24 min 0/2 exercises solved 24 min 0/2 exercises solved
    4. 0x304Files, folders and providersNavigate and manage files with the *-Item and *-Content cmdlets, and explore other drives like Env:. 26 min 0/2 exercises solved 26 min 0/2 exercises solved
  2. Unit 2 · 0/4 lessons

    The object pipeline

    Filter, sort and summarize objects, compare and match text, and move data in and out as CSV and JSON. Badge: Pipeline tamer

    1. 0x405The object pipelineFilter, sort, select, measure and group objects with the core pipeline cmdlets. 30 min 0/2 exercises solved 30 min 0/2 exercises solved
    2. 0x506Comparison operators and filteringCompare with -eq, -like, -match, -contains and friends, combine tests, and avoid the classic traps. 26 min 0/2 exercises solved 26 min 0/2 exercises solved
    3. 0x607Strings and textExpand variables in strings, build text with -f and here-strings, and split, join and replace with regex. 26 min 0/2 exercises solved 26 min 0/2 exercises solved
    4. 0x708CSV, JSON and formattingImport and export CSV and JSON, shape objects with calculated properties, and format output for people. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
  3. Unit 3 · 0/4 lessons

    Scripting

    Write scripts with variables, arrays, hashtables, conditions, loops, functions and modules. Badge: Script crafter

    1. 0x809Variables, arrays and hashtablesStore values in typed variables, lists in arrays, and lookups in hashtables - and splat parameters. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    2. 0x9010Conditions and loopsMake decisions with if and switch, and repeat work with foreach, for, while and do loops. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    3. 0xA011Functions and parametersWrite your own cmdlet-style functions with typed, validated parameters and pipeline input. 32 min 0/2 exercises solved 32 min 0/2 exercises solved
    4. 0xB012Scripts and modulesSave code as .ps1 scripts with parameters, share functions by dot-sourcing and modules, and install modules from the gallery. 26 min 0/2 exercises solved 26 min 0/2 exercises solved
  4. Unit 4 · 0/4 lessons

    Robust automation

    Handle errors, automate safely with -WhatIf and strict mode, run jobs and remote commands, and use PowerShell 7’s best features. Badge: Automation keeper

    1. 0xC013Handling errorsTell terminating from non-terminating errors, catch them with try/catch/finally, and raise your own. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    2. 0xD014Safe automationSupport -WhatIf in your own functions, use the output streams, catch mistakes with strict mode, and keep secrets safe. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    3. 0xE015Jobs, scheduling and remotingRun work in the background with jobs, schedule scripts, and manage other machines with remoting. 24 min 0/1 exercises solved 24 min 0/1 exercises solved
    4. 0xF016The best of PowerShell 7Write modern PowerShell with ternaries, null operators, pipeline chains, -Parallel and friendlier errors. 22 min 22 min
  5. Unit 5 · 0/4 lessons

    Power tools

    Treat code as data with script blocks and scope, define classes and enums, calculate with dates, and reach into .NET for collections and regular expressions. Badge: Power-tool tinkerer

    1. 0x10017Script blocks, scope and closuresTreat code as data with script blocks, predict which variables a function can change, and freeze values into closures. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    2. 0x11018Classes and enumsName fixed sets of values with enums and flags, and model the sanctuary with classes, constructors, methods and inheritance. 32 min 0/2 exercises solved 32 min 0/2 exercises solved
    3. 0x12019Dates, times and durationsParse, format and calculate with dates and time spans without being tripped up by culture, time zones or month ends. 26 min 0/2 exercises solved 26 min 0/2 exercises solved
    4. 0x13020The .NET toolboxReach past cmdlets into .NET: static methods, fast collections, regular expressions and timing your code. 30 min 0/2 exercises solved 30 min 0/2 exercises solved
  6. Unit 6 · 0/4 lessons

    PowerShell in the real world

    Look after computers, call web APIs, test scripts, and see how teams use PowerShell for cloud and identity audits. Badge: Sanctuary engineer

    1. 0x14021Looking after computersInspect and control processes, services, disks, the network and files - the everyday jobs PowerShell was built for. 28 min 0/2 exercises solved 28 min 0/2 exercises solved
    2. 0x15022Web APIs, JSON and XMLTalk to web services with Invoke-RestMethod, handle paging and errors, and read, query and edit XML. 30 min 0/2 exercises solved 30 min 0/2 exercises solved
    3. 0x16023Testing with Pester, and debuggingProve your scripts work with Pester tests and mocks, and hunt bugs with Write-Debug, breakpoints and the debugger. 32 min 0/2 exercises solved 32 min 0/2 exercises solved
    4. 0x17024PowerShell at workSee how IT, cloud and delivery teams turn object pipelines into repeatable audits, runbooks and build checks. 24 min 0/1 exercises solved 24 min 0/1 exercises solved
  7. Unit 7 · 0/1 lessons

    Capstone

    Build the sanctuary’s feeding report from CSV, grouping, hashtables and an advanced function. Badge: Feeding-room hero

    1. 0x18025Capstone: the sanctuary feeding reportCombine CSV import, grouping, hashtables, advanced functions and formatting into a real reporting tool. 45 min 0/3 exercises solved 45 min 0/3 exercises solved