Automation

Best Books to Learn PowerShell Scripting in 2026

This post contains affiliate links. If you buy through them, we may earn a small commission at no extra cost to you. Learn more.

Do you still need a book to learn PowerShell when the docs are free and an AI assistant will write a function for you? We think you do, because the hard part is not syntax. It is the object pipeline, remoting, error handling and the habit of building tools other people can run, and a good book teaches those in the right order. The catch is that many of the PowerShell books still sold today were written for Windows PowerShell 5.1, and their examples break on the PowerShell 7 you will actually install.

Original content from computingforgeeks.com - post 98225

This list keeps only books that still teach the current shell. We checked every edition, page count and price against the Amazon catalog, read the publisher descriptions and tables of contents, and ran the book-era snippets that matter on a fresh Linux box. I ran through this on Ubuntu 24.04 with PowerShell 7.6 LTS and 7.7 in November 2026, and the results below come from that session.

Which PowerShell book should you buy first?

Most readers need one beginner book and one reference, not ten titles. Start from where you are today:

If you are on Linux, install the shell before the book arrives. Our guides for PowerShell 7 on Ubuntu and Debian and PowerShell on Rocky Linux and AlmaLinux get you a working pwsh in a few minutes, and every book here assumes you have one open while you read.

How we picked these books

We started from the live Amazon catalog and the publisher pages, not from memory. A book stayed on the list only if it came from an established technical publisher (Manning, O’Reilly, Packt), had a named author with a PowerShell track record, and taught PowerShell 7 rather than only Windows PowerShell 5.1. We did not read all ten cover to cover, so treat this as a buying guide built on tables of contents, publisher descriptions and the edition data. Star ratings are left out because Amazon’s product API does not return them, and we will not print a number we cannot check.

A book’s target version matters more than its age. The Microsoft PowerShell support lifecycle lists 7.6 as the current LTS release, built on .NET 10 and supported until November 14, 2028, while 7.4 and 7.5 both reached end of support on November 10, 2026. PowerShell 7.7 shipped as the new stable release the same day, according to the project’s GitHub releases. So we tested on the shell a learner would install today, on a small cloud VM:

  • Ubuntu 24.04.5 LTS, 2 vCPUs and 2 GB RAM
  • PowerShell 7.7.0 first, then 7.6.10 LTS
  • PSResourceGet 1.2.1, PSReadLine 2.4.5, ThreadJob 2.2.0

Those bundled module versions come straight from Get-Module -ListAvailable on the 7.6 install, and they matter because books that teach Install-Module predate PSResourceGet, the newer module installer that now ships in the box.

Installing the LTS build next to the latest one fails

Our first snag came before any book example ran. The Microsoft repository for Ubuntu ships two packages, powershell (7.7) and powershell-lts (7.6), and on paper you can choose either. On Ubuntu 24.04 we had 7.7 installed and then asked for the LTS build:

sudo apt-get install -y powershell-lts

dpkg refused, because both packages now own the same /usr/bin/pwsh path. The output below is trimmed to the relevant lines:

Unpacking powershell-lts (7.6.10-1.deb) ...
dpkg: error processing archive /var/cache/apt/archives/powershell-lts_7.6.10-1.deb_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/pwsh', which is also in package powershell 7.7.0-1.deb
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Pick one. For learning from a book, we recommend the LTS build, since an LTS release takes servicing and security fixes rather than new features, so the shell under your book changes less. Remove the stable package first, then install the LTS one:

sudo apt-get remove -y powershell
sudo apt-get install -y powershell-lts
ls -l /usr/bin/pwsh*
pwsh -v

Both pwsh and pwsh-lts now link to the same LTS binary, so every book example that calls pwsh still works:

lrwxrwxrwx 1 root root 36 Nov  9 23:39 /usr/bin/pwsh -> /opt/microsoft/powershell/7-lts/pwsh
lrwxrwxrwx 1 root root 36 Nov  9 23:39 /usr/bin/pwsh-lts -> /opt/microsoft/powershell/7-lts/pwsh
PowerShell 7.6.10

That is the setup every example in the rest of this guide ran on. If you want the newest cmdlets as soon as they ship, keep powershell instead, but do not try to hold both packages at once.

Windows PowerShell 5.1 examples break on PowerShell 7

Older books lean on cmdlets that never made it into PowerShell 7, or exist only on Windows. The classic WMI query from many 5.1-era chapters is the quickest test:

Get-WmiObject -Class Win32_OperatingSystem

PowerShell 7.6 does not know the command at all:

Get-WmiObject: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Get-Service failed the same way on Linux, because the service cmdlets are Windows only. A beginner who hits these errors on page 40 of an old book usually blames themselves, not the book. Microsoft keeps a list of the differences between Windows PowerShell 5.1 and PowerShell 7, and it is worth a skim before you buy anything used.

PowerShell 7 syntax the newer books teach

The books we kept cover the operators PowerShell 7 added, and two of them behave in ways worth seeing before you read about them. Here is the pipeline chain operator pair we ran:

Test-Path /etc/os-release && "os-release present"
Test-Path /etc/missing.conf || "missing.conf absent"

The first line printed both results, but the second printed only False, and the fallback text never appeared:

True
os-release present
False

PowerShell is behaving correctly here. The && and || operators look at whether the previous command succeeded, not at the value it returned, and Test-Path succeeds even when it answers False. Bash habits do not carry over here, and a book that explains $? early saves you an hour of confusion. Parallel loops were the other test, timing five one-second sleeps with and without -Parallel:

(Measure-Command { 1..5 | ForEach-Object { Start-Sleep -Seconds 1 } }).TotalSeconds
(Measure-Command { 1..5 | ForEach-Object -Parallel { Start-Sleep -Seconds 1 } -ThrottleLimit 5 }).TotalSeconds

Run in sequence, the loop took just over five seconds and the parallel one about 1.1 seconds:

5.0173362
1.1434645

We also ran the ternary operator, the ?? null coalescing operator and ConvertFrom-Json -AsHashtable (which returned an OrderedHashtable on 7.6), and all three worked as the PowerShell 7 books describe. None of them exist in Windows PowerShell 5.1, which is the simplest reason to skip a 5.1-only book in 2026.

Compare the ten books side by side

Read the “Targets” column first, because the shell version ages a PowerShell book faster than anything else. Dates are the Amazon print dates, and prices are what Amazon charged on November 29, 2026, which change often:

BookAuthor / PublisherPublishedPagesTargetsLevelPrice
Learn PowerShell in a Month of Lunches, 4th ed.Plunk, Petty, Leonhardt / ManningApr 2022360PowerShell 7, any OSBeginner~$36
PowerShell FundamentalsChris Dent / PacktSep 2026318Not stated (2026 book)Beginner~$30
PowerShell 7 WorkshopNick Parlow / PacktFeb 2024468PowerShell 7, Windows, Linux, PiBeginner~$47
Learn PowerShell Scripting in a Month of Lunches, 2nd ed.Petty, Jones, Hicks / ManningApr 2024336PowerShell 7Intermediate~$49
Mastering PowerShell Scripting, 5th ed.Chris Dent / PacktMay 2024826PowerShell 7.3Intermediate to advanced~$32
Practical Automation with PowerShellMatthew Dowst / ManningMay 2023416Not stated (architecture focus)Intermediate~$46
PowerShell Cookbook, 4th ed.Lee Holmes / O’ReillyJul 202110005.1 and 7.0+Intermediate to advanced~$49
PowerShell Pocket Reference, 3rd ed.Lee Holmes / O’ReillyJun 20212255.1 and 7.0+Any~$19
Windows Server Automation with PowerShell Cookbook, 5th ed.Thomas Lee / PacktJan 2023714PowerShell 7.2, Server 2022Intermediate~$49
PowerShell Automation and Scripting for CybersecurityMiriam C. Wiesner / PacktAug 2023572PowerShell 7.3+ and 5.1Intermediate~$33

Only one of these is newer than PowerShell 7.6 LTS: the 2026 beginner book from Chris Dent. Everything else teaches skills that carry forward cleanly, and where it matters, the section below says what a given book misses on 7.6.

1. Learn PowerShell in a Month of Lunches

This is still the book we hand to anyone starting from zero. The fourth edition was rewritten by Travis Plunk from the PowerShell team, James Petty (CEO of PowerShell.org and a Microsoft MVP) and Tyler Leonhardt, on top of the original by Don Jones and Jeffery Hicks. Manning says it needs no previous PowerShell or Bash experience.

Learn PowerShell in a Month of Lunches Fourth Edition by Travis Plunk, James Petty and Tyler Leonhardt book cover
Learn PowerShell in a Month of Lunches, Fourth Edition by Travis Plunk, James Petty and Tyler Leonhardt. Image: Manning.

Its short chapters each fit in a lunch break, and the order is the reason it works. You learn the help system first, then providers, the pipeline, remoting, background jobs and sessions, and only then regular expressions, error handling and debugging. Manning describes it as updated for the multi-platform PowerShell that runs on Linux and macOS, so its examples target the same cross-platform shell we installed. It does not cover anything added after 2022, which matters little at this level.

Skip it if you already write functions with parameters and error handling, because it stops where intermediate scripting starts. Around $36 (list $39.99), 360 pages. Check the current price on Amazon.

2. PowerShell Fundamentals

Chris Dent published this beginner book in September 2026, which makes it the most recent title on this list. Dent also writes Mastering PowerShell Scripting, so this reads like the foundation that book always assumed you had. Packt aims it at aspiring admins, developers and students with no PowerShell experience.

PowerShell Fundamentals by Chris Dent book cover
PowerShell Fundamentals by Chris Dent. Image: Packt.

The scope is narrow on purpose: commands and modules, variables, objects and the pipeline, operators, then if, switch and loops. That is exactly the material where the 7.x operators we tested above live, so a 2026 book is the safest place to learn them. The listing does not name a PowerShell version, so we could not confirm which 7.x release it was written against, and it leaves remoting and module authoring to later books.

Pass on it if you want one book that takes you to real scripts, since Month of Lunches covers more ground. Around $30 (list $54.99), 318 pages in paperback. Check the current price on Amazon.

3. PowerShell 7 Workshop

Nick Parlow wrote this one for people who will run PowerShell on more than Windows. Packt pitches it at early-career IT staff and students, in everyday language, and it is the only book here with a full chapter on Linux and macOS plus one on the Raspberry Pi.

PowerShell 7 Workshop 1st Edition by Nick Parlow book cover
PowerShell 7 Workshop, 1st Edition by Nick Parlow. Image: Packt.

Its chapters run from the pipeline and files through web requests, REST and JSON, functions, error handling, a first module and securing PowerShell, then finish with .NET. The REST and JSON chapter is the one we would read first, because calling an API is where a first useful script usually starts. If your lab is a Linux VM or a Pi rather than a Windows desktop, this book matches what you see on screen better than any other pick.

Skip it if you only manage Windows servers, since the cross-platform chapters will not earn their pages for you. Around $47, 468 pages in paperback. Check the current price on Amazon.

4. Learn PowerShell Scripting in a Month of Lunches

This is the book to read after the first one, when typing commands is no longer the problem and sharing your scripts is. The second edition from April 2024 is by James Petty, with Don Jones and Jeffery Hicks credited from the first edition. Manning says you need beginner to intermediate PowerShell knowledge going in.

Learn PowerShell Scripting in a Month of Lunches 2nd Edition by James Petty, Don Jones and Jeffery Hicks book cover
Learn PowerShell Scripting in a Month of Lunches, 2nd Edition by James Petty, Don Jones and Jeffery Hicks. Image: Manning.

The 27 lessons walk a script from a one-off into a module: setting up the scripting environment, script security, basic and advanced functions, errors, module manifests, Git source control, Pester tests, code signing and publishing. That last stretch is what separates a script on your desktop from a tool your team can install. Our posh-git setup pairs well with the Git chapter if you work on Windows.

Leave it for later if you are still learning what the pipeline does, because it assumes you know. Around $49 (list $59.99), 336 pages. Check the current price on Amazon.

5. Mastering PowerShell Scripting

When you want one thick book that explains how PowerShell works underneath, this is it. The fifth edition by Chris Dent, from May 2024, runs to 826 pages and, per its Amazon description, covers the enhancements up to PowerShell 7.3 while still noting Windows PowerShell differences.

Mastering PowerShell Scripting Fifth Edition by Chris Dent book cover
Mastering PowerShell Scripting, Fifth Edition by Chris Dent. Image: Packt.

The chapters on working with .NET, web requests, remoting, asynchronous processing, classes and enumerations, testing, error handling and debugging are where it pulls ahead of the beginner books. Some chapters, including regular expressions, are online bonus chapters in this edition, so budget time for those. Packt has a sixth edition listed on Amazon for March 2027, written for PowerShell 7.6, and only as a Kindle preorder so far. If you need the book this year, the fifth edition is still worth buying.

Skip it as a first book unless you learn well from reference material, since the depth can bury a beginner. Around $32 (list $54.99). Check the current price on Amazon.

6. Practical Automation with PowerShell

Matthew Dowst wrote a book that answers the question the other books skip: where does the script run, on what schedule, and with which secrets? Manning aims it at sysadmins who manage backend systems, and Dowst brings over 15 years of IT management and consulting work to it.

Practical Automation with PowerShell by Matthew Dowst book cover
Practical Automation with PowerShell by Matthew Dowst. Image: Manning.

The chapters cover scheduling scripts, handling sensitive data, remote execution, and cloud runners such as Azure Automation and Jenkins alongside Task Scheduler and cron. The closing chapters on sharing scripts across a team, testing and maintenance are what make automation survive its author leaving. It is less about syntax than about architecture, which is why it ages slowly.

Pass on it if you have not written a function yet, since it assumes working PowerShell. Around $46 (list $59.99), 416 pages, and Amazon showed it shipping with a lead time rather than from stock when we checked. Check the current price on Amazon.

7. PowerShell Cookbook

Lee Holmes was on the PowerShell team, and his cookbook is the reference people keep open next to the console. The fourth edition is a 1,000-page collection of over 400 task recipes and 100-plus scripts, aimed at intermediate to advanced admins.

PowerShell Cookbook 4th Edition by Lee Holmes book cover
PowerShell Cookbook, 4th Edition by Lee Holmes. Image: O’Reilly.

O’Reilly describes it as updated for Windows PowerShell 5.1 and open source PowerShell up to 7.0 and beyond, and it covers the interactive shell, files, internet-connected scripts, Active Directory and the filesystem. The quick references for regular expressions, XPath, format specifiers and .NET classes are worth the price alone. Because it dates from 2021, it predates the 7.2 and later changes and the modules bundled since 7.4, such as PSResourceGet, so check a recipe against the 7.6 docs when it touches WMI or other Windows-only areas.

Skip it if you want to learn in order, since a cookbook answers questions rather than teaching. Around $49 (list $89.99), and stock was limited when we checked. Check the current price on Amazon.

8. PowerShell Pocket Reference

The Pocket Reference is the cheap, small sibling of the Cookbook, excerpted from it by the same author. At 225 pages it is the book you keep in a laptop bag rather than on the desk.

PowerShell Pocket Reference 3rd Edition by Lee Holmes book cover
PowerShell Pocket Reference, 3rd Edition by Lee Holmes. Image: O’Reilly.

It condenses the language and environment, regular expression and XPath references, .NET string and date formatting, selected .NET classes, WMI and COM references, and the standard verbs into a format you can scan in seconds. The third edition covers Windows PowerShell 5.1 and PowerShell 7. For a free alternative, our PowerShell cheat sheet covers cmdlets, remoting and modules and comes as a PDF.

Skip it if you already own the Cookbook, since this is a subset of it. Around $19 (list $29.99). Check the current price on Amazon.

9. Windows Server Automation with PowerShell Cookbook

Thomas Lee wrote this cookbook for people who run Windows Server and want ready recipes for it. The fifth edition from January 2023 has over 100 recipes built on PowerShell 7.2 and Windows Server 2022, and it assumes you already know the basics.

Windows Server Automation with PowerShell Cookbook Fifth Edition by Thomas Lee book cover
Windows Server Automation with PowerShell Cookbook, Fifth Edition by Thomas Lee. Image: Packt.

The recipes cover Active Directory, networking and DHCP, JEA and group policy, storage, printing, Windows containers, Hyper-V, WSUS and Azure VMs. PowerShell 7.2 reached end of support in November 2024, so run the recipes on 7.6 and expect to adjust the odd one. The role modules they lean on come with Windows Server rather than with PowerShell itself. Our Windows Server administration books list pairs this with a Windows Server 2025 reference, which is the combination we recommend.

Skip it if your PowerShell work happens on Linux or in the cloud, since nearly every recipe targets Windows Server roles. Around $49, 714 pages. Check the current price on Amazon.

10. PowerShell Automation and Scripting for Cybersecurity

Miriam C. Wiesner is a Microsoft security expert and the author of the EventList and JEAnalyzer tools, and her book treats PowerShell from both sides of an attack. It is the only title here written for red and blue teamers rather than general admins.

PowerShell Automation and Scripting for Cybersecurity 1st Edition by Miriam C. Wiesner book cover
PowerShell Automation and Scripting for Cybersecurity, 1st Edition by Miriam C. Wiesner. Image: Packt.

The chapters run through remoting, detection with event logs and auditing, system and API access, Active Directory attacks and mitigations, Entra ID (formerly Azure AD), then a red team cookbook and a blue team cookbook. JEA, AMSI, application control and code signing get real attention, which is what defenders need to lock PowerShell down instead of banning it. Packt suggests a basic grasp of PowerShell and security fundamentals before you start. For the offensive side beyond PowerShell, see our penetration testing books list.

Skip it if security is not part of your job, because most chapters take the point of view of an attacker or a defender. Around $33 (list $59.99), 572 pages. Check the current price on Amazon.

What to look for in a PowerShell book

A few checks on the listing tell you whether a PowerShell book is still worth your money. Look at these before you buy, new or used:

  • The version named in the title or blurb: PowerShell 7 beats Windows PowerShell 5.1
  • A publication date of 2021 or later, so it covers more than PowerShell 7.0
  • Remoting over SSH, not only WinRM
  • Pester tests and module publishing for any scripting book
  • A code repository you can clone

We dropped four books from the 2023 version of this list on exactly those grounds:

  • Windows PowerShell in Action (2017): predates PowerShell 7
  • Windows PowerShell Step by Step (2015): predates PowerShell 7
  • PowerShell for Sysadmins: No Starch lists it as covering Windows PowerShell 5.1
  • PowerShell 7 for IT Professionals (2020): written for PowerShell 7.0

None of them is a bad book, but the first three teach Windows PowerShell 5.x or the PowerShell 6 era, where scripts lean on cmdlets like the Get-WmiObject that failed above, and the fourth targets releases that are long out of support. If you manage Windows desktops too, our winget guide installs PowerShell 7 alongside the built-in 5.1 in one command.

What I would change in this list next year

Two things will move this list in 2027, and both are already on the calendar:

  • Mastering PowerShell Scripting, 6th edition, due March 2027 for PowerShell 7.6
  • PowerShell 7.6 LTS support running until November 2028

The sixth edition will likely replace the fifth here once a paperback is listed. The long LTS window works the other way, because any book written for 7.4 or earlier keeps losing ground on new syntax and module changes like the ThreadJob rename in 7.6.

If I were buying today with only one slot, I would take Learn PowerShell in a Month of Lunches and the free Microsoft docs, then add the scripting sequel once you start writing functions. Install the LTS build, not both packages side by side, and you will avoid the one install error we hit before a single book example ran.

Keep reading

OpenCode CLI Cheat Sheet: Commands, Sessions and Fixes (PDF) AI OpenCode CLI Cheat Sheet: Commands, Sessions and Fixes (PDF) Create a Bootable Windows 11 USB and Install Windows 11 Windows Create a Bootable Windows 11 USB and Install Windows 11 Set Up a Samba Share on Windows 11 and Access It from Linux Networking Set Up a Samba Share on Windows 11 and Access It from Linux Install Grok Build on Windows 11 (Formerly Cursor) AI Install Grok Build on Windows 11 (Formerly Cursor) netsh Commands Cheat Sheet: Wi-Fi, Firewall, Port Proxy (PDF) Cheat Sheets netsh Commands Cheat Sheet: Wi-Fi, Firewall, Port Proxy (PDF) Complete Guide to Installing Active Directory Services on Windows Server 2022/2025 Windows Complete Guide to Installing Active Directory Services on Windows Server 2022/2025

Leave a Comment

Press ESC to close