Learn PowerShell
Automate Windows, servers and cloud chores with a shell that passes objects.
Free to start. Built from a single prompt. No credit card.
PowerShell is Microsoft's command-line shell and scripting language for automating system administration. Unlike traditional shells that pass plain text between commands, PowerShell passes structured .NET objects through its pipeline, so you can filter and sort by properties instead of parsing text. Commands, called cmdlets, follow a predictable Verb-Noun pattern like Get-Process and Stop-Service. PowerShell 7 runs on Windows, macOS and Linux, and it manages Active Directory, Microsoft 365, Azure and more through modules. Learnr builds a personalized PowerShell course from your prompt and teaches it in short, interactive lessons.
How to learn PowerShell, step by step
- Install PowerShell 7 and a good editor. Windows ships with Windows PowerShell 5.1, but install the cross-platform PowerShell 7, launched as pwsh, for current features. Use Visual Studio Code with the PowerShell extension for syntax help and debugging.
- Learn to discover commands yourself. Get-Command *service* finds cmdlets, Get-Help Get-Service -Examples shows usage, and piping anything to Get-Member lists its properties and methods. These three commands let you explore almost any task without searching online.
- Think in objects, not text. Run Get-Process | Where-Object CPU -gt 100 | Sort-Object CPU -Descending | Select-Object -First 5 and notice you never parsed a column. Export results with Export-Csv or ConvertTo-Json to share them.
- Learn the comparison operators and syntax quirks. PowerShell uses -eq, -ne, -lt, -like and -match instead of symbols like == or <. Variables start with $, hash tables use @{}, and string comparison is case-insensitive by default.
- Write safe scripts and functions. Save .ps1 files, add parameters with a param block, and use try and catch for errors. Test changes with -WhatIf and -Confirm before running them for real, and understand execution policy rather than simply disabling it.
- Automate one real chore. Clean up old log files, report disk space across machines or bulk-create user accounts in a test environment, then schedule it. Brief Learnr lessons with streaks keep cmdlet names and syntax at your fingertips.
What you'll learn
- Discover commands with Get-Command, Get-Help and Get-Member
- Filter, sort and format objects in the pipeline
- Write scripts with variables, loops, conditions and functions
- Handle errors with try, catch and -ErrorAction
- Automate real tasks such as file cleanup, reporting and remote management
What's inside your PowerShell course
A sample path Learnr builds for PowerShell. Your real course adapts to your goal and level.
- 1. The console, cmdlets and the Verb-Noun pattern
- 2. Objects, properties and the pipeline
- 3. Variables, operators, arrays and hash tables
- 4. Scripts, functions, parameters and modules
- 5. Error handling, execution policy and safety
- 6. Remoting, scheduled tasks and real automation
How long does it take to learn PowerShell?
Running and combining everyday cmdlets takes 1 to 3 weeks at a few hours a week. Writing reliable scripts with functions, error handling and modules for real admin work usually takes 2 to 4 months, shorter if you already script in Bash or Python.
What you need before you start
Familiarity with files, folders and basic operating system concepts. Experience with Windows administration or any command line helps, but no programming background is required.
Common mistakes to avoid
- Parsing command output as text, the way you would in Bash. Use object properties with Where-Object and Select-Object instead of splitting strings.
- Running destructive commands like Remove-Item -Recurse without testing. Add -WhatIf first and confirm exactly what the command will touch.
- Writing == or > in comparisons, which do not compare in PowerShell and > even redirects output to a file. Use -eq and -gt.
How Learnr builds your course
Type your topic
Tell Learnr you want to learn PowerShell, or get as specific as you like.
Get a personalized course
Learnr instantly builds a full PowerShell course tailored to your goal and skill level.
Learn and level up
Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.
PowerShell questions, answered
What is the difference between Windows PowerShell and PowerShell 7?
Windows PowerShell 5.1 is built into Windows and runs on .NET Framework. PowerShell 7 is the newer, open-source, cross-platform version on modern .NET. Most scripts work in both, but new development happens in PowerShell 7.
Is PowerShell useful outside Windows?
Yes. PowerShell 7 runs on macOS and Linux and is widely used to manage cloud services like Azure and Microsoft 365. On Linux servers, though, Bash remains the more common default shell.
Explore more courses
More programming and tech courses
- Learn Excel VBA
- Learn WordPress
- Learn Object-Oriented Programming
- Learn Functional Programming
- Learn Design Patterns
- Learn Software Testing
- Learn Computer Architecture
- Learn Coding
See all programming and tech courses
Ready to learn PowerShell?
Start your free, personalized PowerShell course in seconds. .