Start here

PowerShell Tutorial for Beginners: Start Here

A clear, step-by-step path from your first PowerShell command to real automation. Follow the 10 steps in order, or jump straight to the task you need in the full list of 359 tutorials below.

Start with Step 1 Browse all 359 tutorials

  • 359Free tutorials
  • 10Steps from zero to scripts
  • 15Topics
  • 7 & 5.1PowerShell versions tested

Updated September 30, 2026

# Which version am I running?
PS C:\> $PSVersionTable.PSVersion

Major  Minor  Patch
-----  -----  -----
7      6      6

# Check two Windows services
PS C:\> Get-Service -Name Spooler, W32Time

Status   Name     DisplayName
------   ----     -----------
Running  Spooler  Print Spooler
Running  W32Time  Windows Time

PS C:\> 
Real output from PowerShell 7.6Check your version
  • A path in the right order, so each step builds on the last
  • A practice task at every step to try on your own PC
  • Every tutorial on the site, sorted by topic and searchable

The basics

What is PowerShell?

PowerShell is Microsoft’s command-line shell and scripting language for automating tasks. You type commands, called cmdlets, or save them in a script, and PowerShell does the work for you: checking hundreds of computers, renaming thousands of files or building a report in seconds.

Unlike Command Prompt, PowerShell passes objects, not plain text, from one command to the next. That’s why you can filter, sort and export results without cutting up text. Microsoft’s PowerShell overview covers the background.

I’ve used PowerShell every day for years to manage Windows servers, files and Microsoft 365. This page is the order I’d teach it in, with a practice task at each step.

  • Two versions on WindowsWindows PowerShell 5.1 is built in. PowerShell 7 is the current version, and installs alongside it.
  • Verb-Noun commandsCmdlets such as Get-Service, Stop-Process and New-Item tell you what they do.
  • The pipelineThe | symbol sends the results of one command straight into the next.
  • Runs almost everywherePowerShell 7 runs on Windows, macOS and Linux, and manages Microsoft 365 and Azure.

Choose your goal

Pick the Path That Fits You

Short on time? Each path is five tutorials that get you to a useful result fast. For the full picture, follow the 10-step roadmap below.

The learning roadmap

Learn PowerShell in 10 Steps

Work through the steps in order. Read the tutorials, run the examples yourself, then try the practice task before moving on.

  1. Install and open PowerShell

    Windows already includes Windows PowerShell 5.1. Install PowerShell 7 next to it for new work, and learn where each one opens.

    Try it: Run $PSVersionTable.PSVersion in both versions and compare the numbers.

  2. Run commands and your first script

    Commands follow a Verb-Noun pattern, like Get-Service. Save a few of them in a .ps1 file and you have a script.

    Try it: Save Get-Date and Get-Service in hello.ps1, then run it from a PowerShell window.

  3. Variables and data types

    Variables start with $ and can hold text, numbers, dates or whole objects. Knowing the type saves you from odd errors later.

    Try it: Store your name and today’s date in two variables and print them in one sentence.

  4. Operators and conditions

    Comparison operators such as -eq and -like return True or False, and if and switch act on the result.

    Try it: Check whether C: has less than 20 GB free and print a warning if it does.

  5. Loops

    Loops repeat the same work for every file, user or server. Most scripts use foreach or ForEach-Object.

    Try it: Loop through the files in a folder and print each name with its size in KB.

  6. Strings, arrays and hashtables

    Most real scripts clean up text and collect results. These are the tasks you’ll repeat most.

    Try it: Split a comma-separated list of US states into an array and sort it.

  7. The pipeline: filter, select and sort

    The pipeline | passes objects from one command to the next. This is where PowerShell becomes much faster than clicking.

    Try it: Show the five processes using the most memory, with only their name and memory.

  8. Files, folders, CSV and JSON

    Read, write, copy and clean up files, and turn data into CSV or JSON that other tools can use.

    Try it: Export the list of running services to a CSV file and open it in Excel.

  9. Functions, scripts and error handling

    Wrap repeated code in functions with parameters, and handle failures with try and catch so scripts don’t stop halfway.

    Try it: Turn your disk-space check into a function that takes a drive letter.

  10. Automate real admin tasks

    Put it all together: manage Windows computers, run commands on other PCs and automate Microsoft 365.

    Try it: Write a daily report script that checks disk space and stopped services, and saves the result to a CSV file.

Your beginner toolkit

Set Up, Learn the Key Cmdlets and Fix Common Errors

Before you start

  • Use PowerShell 7 for new scriptsKeep Windows PowerShell 5.1 for older modules. Microsoft explains the differences between the two.
  • Install Visual Studio CodeWith the PowerShell extension you get IntelliSense and debugging. See the best VS Code extensions.
  • Allow your own scriptsSet the execution policy to RemoteSigned with Set-ExecutionPolicy instead of turning protection off.
  • Practice in a test folderWork in a folder such as C:\PSPractice, and add -WhatIf to commands that change or delete things.
  • Run as administrator only when neededEveryday learning doesn’t need an elevated window. Tasks like installing features do.

Every tutorial on the site

All 359 PowerShell Tutorials by Topic

Looking for one task? Type a word like csv, service or date to filter the list.

Showing all 359

Files and folders

51Topic guide

Create, read, copy, move, search and delete files and folders.

Windows system administration

55

Hardware, software, updates, services, processes, printers and Windows settings.

No tutorial matches that word. Try a shorter word, or search the whole site.

PowerShell for Beginners: FAQs

What is PowerShell?

PowerShell is Microsoft’s command-line shell and scripting language for automating tasks. It works with objects instead of plain text, and PowerShell 7 runs on Windows, macOS and Linux.

Is PowerShell hard to learn?

Not if you learn it in order. Commands use a predictable Verb-Noun pattern, like Get-Service and Stop-Process, so after the first few you can often guess the rest.

Should I learn PowerShell 7 or Windows PowerShell 5.1?

Learn PowerShell 7 for new scripts, because it’s the version Microsoft keeps improving. Windows PowerShell 5.1 still ships with Windows, so it helps to know the few places where the two behave differently.

Is PowerShell free?

Yes. Windows PowerShell 5.1 is part of Windows, and PowerShell 7 is a free, open-source download from Microsoft.

Do I need administrator rights to learn PowerShell?

No. Most learning works in a normal window. You only need Run as administrator for tasks that change Windows itself, such as installing features or managing services.

How do I practice PowerShell safely?

Practice in a test folder, add -WhatIf to commands that change or delete things, and try new scripts on a test computer before using them at work.

What is the difference between PowerShell and Command Prompt?

Command Prompt runs text-based commands and batch files. PowerShell passes objects through a pipeline, has thousands of cmdlets and can manage Windows, Microsoft 365 and Azure.

100 PowerShell Cmdlets free PDF ebook by Bijay Kumar

Free PDF download

100 PowerShell Cmdlets with Examples

Keep the most useful PowerShell cmdlets in one handy PDF while you learn, each with a short explanation and an example you can run.

You’ll also get new PowerShell tutorials by email. Unsubscribe anytime.
Send Me the Ebook
Bijay Kumar

Written by Bijay Kumar, a 13-time Microsoft MVP with 18+ years of hands-on experience. Scripts are run on PowerShell 7 and Windows PowerShell 5.1 before they’re published. Found a problem? Email bijay@powershellfaqs.com.

About PowerShell FAQs