Free PowerShell tutorials

Learn PowerShell with Real Scripts and Examples

Step-by-step PowerShell tutorials for IT admins, sysadmins and developers. Every guide gives you a script you can copy, explains what each line does and shows the output, from your first command to automating files, Windows servers and SharePoint Online.

Get the Free 100 Cmdlets Ebook Start Learning PowerShell

  • 700+Free tutorials
  • 13×Microsoft MVP author
  • 18+ yearsHands-on experience
  • 7 & 5.1PowerShell versions tested
# Find .log files older than 30 days
PS C:\Scripts> Get-ChildItem C:\Logs -Filter *.log |
>> Where-Object LastWriteTime -lt (Get-Date).AddDays(-30) |
>> Select-Object Name, LastWriteTime

Name          LastWriteTime
----          -------------
app-0712.log  7/12/2026 9:14:02 AM
app-0713.log  7/13/2026 9:15:47 AM

PS C:\Scripts> 
Tested on PowerShell 7 and 5.1Learn this script
  • Copy-and-run scripts with the real output for every example
  • Fixes for real error messages admins hit every day
  • Kept up to date as PowerShell and Windows change

Where do you want to go?

Pick a PowerShell Learning Path

Follow the steps in order. Each one builds on the last, so by the end you can write the script yourself.

Learn by topic

PowerShell Tutorials from Beginner to Advanced

Every topic starts with one main guide, followed by the related tutorials readers look for most.

Quick reference

PowerShell Cmdlets with Examples

The cmdlets you will reach for most. Each one opens a tutorial with the syntax, the common parameters and working examples.

All PowerShell commands

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, each with a short explanation and an example you can run. Enter your email and the ebook is sent straight to your inbox.

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

Why you can trust these tutorials

How We Write and Test Every Script

  • Real admin tasks

    Topics come from real work and real questions: automating files, managing Windows computers and SharePoint Online, and the errors that stop a script from running.

  • Every script is run first

    Each script is run on both PowerShell 7 and Windows PowerShell 5.1 before it is published. Where the two versions behave differently, the tutorial says so.

    PowerShell 7Windows PowerShell 5.1

  • Output you can check

    You see the command, an explanation of what each part does and the actual output or screenshot, so you know what to expect on your own computer.

  • Kept up to date

    Tutorials are reviewed and updated when PowerShell, Windows or Microsoft 365 changes, so older guides do not quietly stop working.

Found a script that doesn’t work or a step that’s out of date? Email bijay@powershellfaqs.com and it will be checked and fixed.

PowerShell FAQs

Frequently Asked PowerShell Questions

What is PowerShell used for?

PowerShell is Microsoft’s command-line shell and scripting language. IT admins and developers use it to automate repetitive work: managing files, users, services and Windows settings, working with CSV and JSON data, and administering Microsoft 365, SharePoint Online and Azure. Unlike older shells, it passes full .NET objects through the pipeline instead of plain text.

Is PowerShell a programming language?

How do I check which version of PowerShell I have?

Open PowerShell and run $PSVersionTable.PSVersion. Version 5.1 is Windows PowerShell, which is built into Windows. Version 7 or later is the newer, cross-platform PowerShell.

How to check your PowerShell version

What is the difference between Windows PowerShell 5.1 and PowerShell 7?

Windows PowerShell 5.1 ships with Windows, runs on .NET Framework and starts with powershell.exe. It still gets security fixes but no new features. PowerShell 7 runs on modern .NET, works on Windows, macOS and Linux, starts with pwsh.exe and adds features such as the ternary operator and ForEach-Object -Parallel. The two can be installed side by side.

Update PowerShell on Windows 11

Why does PowerShell say “running scripts is disabled on this system”?

Windows blocks scripts by default through the execution policy. For your own account, running Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser lets local scripts run while scripts downloaded from the internet still need a trusted signature.

Fix “running scripts is disabled”

Is PowerShell better than CMD?

For automation, yes. CMD works with text, while PowerShell works with objects, so you can filter, sort and export results without parsing strings. PowerShell can also run most CMD commands, so you do not lose anything by switching.

Windows PowerShell vs CMD

How do I run a PowerShell script?

Save your code in a file with the .ps1 extension, open PowerShell in that folder and run it with .\script.ps1. You can pass values to the script as parameters, for example .\script.ps1 -Path C:\Logs.

Run a script from the command line with parameters
Bijay Kumar, 13-time Microsoft MVP and founder of PowerShellFAQs.com
Bijay KumarFounder · PowerShell expert

13× Microsoft MVP · View profile

About the author

Meet Bijay Kumar

Bijay Kumar is the founder of PowerShellFAQs.com and a 13-time Microsoft Most Valuable Professional (MVP). He has more than 18 years of hands-on experience with Microsoft technologies, and PowerShell has been part of his daily work for automating Windows administration, file and data tasks, and Microsoft 365 and SharePoint Online.

Before starting his own company he worked with HP, TCS and KPIT. Today he leads TSInfo Technologies, a Microsoft-focused development company that builds solutions for clients in the United States and Europe. The tutorials on this site come from that real project work: the scripts his team writes, the tasks they automate and the errors they fix.

Every script is run on PowerShell 7 and Windows PowerShell 5.1 before it is published. You can verify his MVP recognition on Microsoft’s MVP site, connect with him on LinkedIn, or email bijay@powershellfaqs.com.

  • 13×Microsoft MVP award
  • 18+Years of experience
  • 700+PowerShell tutorials
  • 7 & 5.1Versions tested
  • PowerShell 7
  • Windows PowerShell 5.1
  • Scripting & automation
  • Windows administration
  • PnP PowerShell
  • SharePoint Online
  • Microsoft 365