Um momento

Learn PowerShell

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

Start learning 17 lessons · about 7.5 hours · free
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. 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/1 lessons

    Capstone

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

    1. 0x10017Capstone: 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
Gostou da aula? 😆👍
Apoie nosso trabalho com uma doação: