Leanpub Header

Skip to main content

Topics

PowerShell

From the help system and the object pipeline to tools, modules and tests, Active Directory, Exchange and Desired State Configuration, PowerShell as told through the free samples of the Leanpub books about it.

Created from the free samples of 9 Leanpub books and the descriptions and tables of contents of 34 more, with every source cited.

PowerShell is Microsoft's command-line shell and scripting language for administering computers. What distinguishes it from the shells that came before is the pipeline: its commands pass one another structured objects and not lines of text, a difference that one guide for programmers arriving from other languages treats as the thing to master first.[12] It began as a tool for Windows and is now, in the words of a member of its development team, an open-source, cross-platform tool for automation and configuration in the cloud and on a company's own servers.[8]

Its users are for the most part not programmers by training. The most widely read book on the shelf was written, its author says, to save IT professionals who learned their trade by pointing and clicking from their own reluctance to learn it.[10] A large literature has grown up to take such readers from a first command to scripts that others can rely on, and much of it has been written by the community of practitioners itself, in several cases with the royalties given to a scholarship for newcomers.[41]

This article follows the subject from the shell and the language through the making of tools, modules, tests and documentation, remoting and the administration of Windows and Active Directory, Exchange and Microsoft 365, Desired State Configuration, PowerShell beyond Windows, and the community's own books. Its sources are the free samples of the Leanpub books listed at the end, with the descriptions and tables of contents of the books whose samples were not available or not read, and every claim that rests on a source is cited to it.

Where to start

An administrator who has never used the shell should begin with PowerShell 101 (2026), a condensed introduction to the topics its author found an IT professional needs in production.[10] The Complete Powershell Training for Beginners (2020) starts lower still, with how to open the console and how it differs from the old command prompt,[9] and Notes From the Field: A PowerShell Primer (2020) is for people new to the language who manage Microsoft's mail and office products.[11] A programmer who knows Bash or Python and little PowerShell is the reader of Powershell Programming in 2026 (2026).[12]

The next step is practice and then design. The PowerShell Practice Primer (2024) assumes an introductory book has been read and supplies exercises;[13] The PowerShell Scripting and Toolmaking Book (2024) is for people who already script and want to build tools properly;[1] and Behind the PowerShell Pipeline (2025) is for the same readers once they want to write commands that other people find easy to use.[3]

After that the books divide by job. Those who run Active Directory have a series of short guidebooks, beginning with The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Users and Computers,[24] and those who run Exchange have a series of long references, of which Practical PowerShell: Exchange Online (2024) covers the hosted service.[33] The collections of conference chapters are written for intermediate and advanced users.[43]

History

PowerShell was released in 2006 as a replacement for the Windows command prompt and for the scripting hosts administrators had used until then, and within a few years Microsoft's server products were being built so that everything their graphical consoles could do was a PowerShell command underneath. In 2016 the project was made open source and ported to Linux and macOS, and the rewritten line reached version 7 in 2020, while the older Windows PowerShell 5.1 remains installed on every Windows machine.

The books span this history. The author of the introductory book has used the shell since 2007,[10] and a veteran teacher remarks that it might have been possible to memorise everything PowerShell could do in its first version and is not today.[3] One book is a collection of articles written for the release of version 7 in March 2020, among them an account of the experimental features that the community asked for once the project had become open source.[8] The authors of the toolmaking book explain that they publish continuously because the subject changes too fast for a traditional press, thanks in part to tools built by the community.[1] And the handbooks on configuration management record the latest turn, in which that feature was separated from PowerShell altogether and its engine rewritten in another language.[6]

The shell and the language

PowerShell 101 teaches the shell in the order in which an administrator comes to need it. After finding and launching PowerShell and the policy that governs whether scripts may run, its second chapter is the help system and what it calls the three core commands, for reading help, for finding commands and for discovering what an object contains. Then come one-line commands and the pipeline, with the rules its chapter titles compress into two phrases, filter as far to the left as possible and format only at the right-hand end; flow control and loops; the management interfaces through which remote computers are queried; remoting; and finally functions and script modules. Each chapter ends with a summary, review questions and references, and the book is written for Windows PowerShell 5.1 in an Active Directory domain, with the note that the concepts apply to every version. Its author calls it a collection of what he wishes someone had told him when he began, in place of a book built on invented scenarios.[10]

The other introductions differ in emphasis. The Complete Powershell Training for Beginners, the written form of a video course, spends most of its time on a routine for finding the right command and reading its syntax, beginning with the naming of commands as a verb and a noun, after an orientation in the two places the shell can be used, the console and the scripting environment that ships with Windows.[9] Notes From the Field: A PowerShell Primer teaches variables, arrays, hash tables, loops and functions from scenarios met at work.[11] Powershell Programming in 2026 treats cross-platform PowerShell 7 as a language to be learned on its own terms and not as a glorified shell, moving from the pipeline and advanced functions to modules, data formats, remoting, testing and delivery pipelines.[12]

Two books teach by comparison and one by drill. PowerShell Guide to Python (2019) sets PowerShell and Python code for the same task side by side, for administrators learning the one and developers learning the other,[14] and PowerShell to C# and back (2022) does the same for C#.[15] The PowerShell Practice Primer holds more than a hundred problems of rising difficulty, each to be solved with a few lines at the prompt, on the argument that the language is learned like a foreign language, by constant use.[13]

From scripts to tools

The step that the literature cares most about is from a script that works to a tool that others can use. The PowerShell Scripting and Toolmaking Book defines the aim as tools that behave like the shell's native commands, and proceeds from the design of a function through advanced parameters, help, debugging, sources of data and controller scripts to testing, with review questions and laboratory exercises. It is the sequel to its authors' introductory tutorial, written, the foreword says, because the writing of help, unit testing and work with different sources of data would not fit that format, and because they wanted more depth even in the main story of building a proper tool.[1] Building a PowerShell Tool (2019) shows the process once, building a single script from nothing through repeated refactoring into a tool that gathers information from many servers.[16] Two short guidebooks treat the unit of construction: POWERSHELL 101 GETTING STARTED WITH FUNCTIONS introduces functions, their place in the pipeline and the attribute that makes one behave like a built-in command,[19] and PowerShell: From Zero to Deep Dive with Function Parameters takes function parameters from first principles to validation and parameters created at run time.[20]

Three books are about judgement. PowerShell Tips to Write By (2020) is a collection of short tips under headings that amount to a creed: plan before coding, do not reinvent the wheel, build functions as building blocks, write tests, handle errors, log what a script does, and make everything a parameter.[17] Behind the PowerShell Pipeline is about the thinking behind the syntax, and its first chapter is on learning how to learn: identify authoritative sources before anything else, and when faced with a new technology learn it through its graphical interface before reaching for its commands. The author offers this as opinion, founded on twenty-five years of teaching administrators, and insists that the quality of a source matters more than its convenience.[3]

Four-Phase Orchestration (2026) is the most rigorous. It opens with a short repair script and shows how it fails across forty machines, tracing every fault to four symptoms: state hidden in the flow of control, side effects that are not safe to repeat, no means of asking the script what it is about to do, and nothing left behind to audit when it dies. Its definition of the second is exact, that the outcome of a run should depend only on the present state of the machine and never on the history of earlier attempts, and its remedy is to build automation in four separate phases that discover, validate, decide and only then act.[5] Real World PowerShell (2021) offers finished examples of advanced functions, each with its problem, solution and explanation.[18]

Modules, tests and documentation

A tool is distributed as a module. Building PowerShell Modules (2021) treats the author of one as a software developer: what modules are and why to build them, their kinds, where they live and how they are found and installed from the public gallery, the manifest that describes one, dependencies between modules, the layout of a project, private functions, and versioning. The benefits it names are the sharing and reuse of code and the ability to version it, and it shows how an ordinary script is turned into a module and how a module is loaded automatically when one of its commands is first used.[4] PlatyPS (2025) covers the companion task of documentation, with a tool that generates and maintains a module's help.[21]

The Pester Book (2021) is the guide to the language's testing framework. Its introduction distinguishes the kinds of test: the unit test, which exercises one piece of code in isolation with various inputs; the integration test, which runs the whole; the regression test, repeated after a fix to see whether it broke anything; and the acceptance test of the desired outcome, which for a script that creates a user account is not the account but a person able to sign in. The book starts from no knowledge of testing, with a first test made to fail and then to pass, and goes on to the replacement of real commands by stand-ins, the measurement of coverage and the testing of infrastructure.[2] Modern IT Automation with PowerShell (2022), a textbook by many hands, sets testing beside version control and code review, regular expressions, and the securing of PowerShell itself through signed scripts and restricted modes.[22]

Remoting, Windows and Active Directory

The administrator's work is done on other machines. POWERSHELL REMOTING EVERYTHING YOU EVER WANTED TO KNOW (2022) collects seven tutorials on running commands remotely, from enabling the feature to the less common arrangements, Linux machines, computers outside a domain and encrypted transport.[23] It belongs to a family of short guidebooks by one publisher, most of them on managing Active Directory from the command line and each a handful of independent tutorials. The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Users and Computers covers the everyday commands for user accounts, password resets, locked-out users, joining computers to a domain and repairing their trust;[24] The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Groups the creation, membership and auditing of groups;[25] The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Querying AD the finding of objects with the directory's module and two older export tools;[26] and The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Group Policy the checking, refreshing and exporting of policy.[27] The infrastructure has its own volumes, on directory roles and sites,[28] on tracking changes and building a health check,[29] and on two diagnostic tasks.[30]

Software deployment is the other standing task. ConfigMgr - An Administrator's Guide to Deploying Applications using PowerShell (2020) is a guide for administrators of Microsoft's configuration manager to installing applications with scripts, with detection rules and a reusable template,[31] and WinGet and Beyond (2025) is a guide to the Windows package manager that ties it to PowerShell and to configuration resources.[32]

Exchange and Microsoft 365

Microsoft's mail server has been managed through PowerShell longer than any other product, and one series of references is devoted to it. Each volume opens with the basics of the language and the building of scripts and then goes through the product feature by feature: Practical PowerShell: Exchange Online for the hosted service, across users, groups, mail flow, compliance, migrations and reporting;[33] Practical PowerShell: Security and Compliance Center (2024) for the commands behind the security and compliance features of Microsoft 365;[34] and three for successive editions of the server that companies run themselves, the 2016 edition,[35] the 2019 edition[36] and the subscription edition that followed.[37] The volumes run to between five and eight hundred pages, describe themselves as built from scenarios their authors have met, and the earliest says of itself that it is not a cookbook.[35]

Desired State Configuration

Desired State Configuration is the practice of declaring the state a machine should be in and leaving a tool to bring it there. The DSC V3 Handbook (2025) describes its third version, which runs as a program of its own and no longer as a PowerShell command. The sample explains the reasons: the engine was rewritten in Rust so that it could run where the .NET runtime is absent or not permitted, and the agent that once applied configurations on each machine had already been decoupled so that other orchestrators could take its place. The book covers the new vocabulary, configuration documents, the manifests that describe resources, and resources written in languages other than PowerShell.[6] The Microsoft DSC Handbook (2026), by the same author, treats the engine as it now stands across Windows, Linux and macOS, with adapters that keep the older PowerShell resources usable.[38] Enforcing Compliant Configurations (2021) compares four ways of enforcing configuration on a fleet of devices, of which this is one and group policy another, against the same criteria.[39]

Beyond Windows

Version 7 runs wherever its runtime does, and several books take that as their premise. #PS7Now (2020) gathers one article per new or changed feature for administrators deciding whether to move from the Windows-only version.[8] Real World PowerShell points the language at systems that are not Microsoft's, a virtualisation platform, a public cloud, a container orchestrator and a configuration tool, and says that everything in it runs on Linux and macOS as well.[18] PowerShell & Python on AWS (2022), which its author describes as unfinished, shows the same cloud automation in both languages.[40]

ChatOps the Easy Way (2019) carries automation into the chat room. Its author, who wrote the bot the book installs, defines the practice as a model of collaboration that connects people, tools, process and automation in a transparent workflow, bringing the tools into the conversation so that context is shared, and distinguishes it from the consumer chatbot. The early chapters make the social case, with a short history of chat at work, before the book turns to installing the bot, connecting it to a chat service, running it in the background and extending it with plugins.[7]

The community's books

A distinctive part of the shelf is written collectively. The PowerShell Conference Book (2018) presents more than thirty authors with a chapter each, arranged like the sessions of a conference and readable in any order, in four parts on scripting, PowerShell in practice, DevOps and cloud operations,[41] and two further volumes followed in 2020, the second adding a part on the internals of the language and one on workplace culture,[42] the third appearing in a year when the conferences themselves were cancelled or held online.[43] Modern IT Automation with PowerShell grew out of them as a more academic textbook for teaching.[22] All of these give their royalties to a scholarship programme for people entering the field, to which the author of the introductory book also donates a share and the collection on version 7 directs its readers' donations.[10][8]

Sources

Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.

  1. 1.
    The PowerShell Scripting and Toolmaking Book, Don Jones, Jeff Hicks Free sample: the front matter, the foreword and the outline of the book's parts. 2024. Free sample: PDF · EPUB
  2. 2.
    The Pester Book, Adam Bertram Free sample: the introduction on kinds of testing and the first chapters on installing Pester and a first test. 2021. Free sample: PDF · EPUB
  3. 3.
    Behind the PowerShell Pipeline, Jeff Hicks: Discovering What You Didn't Know You Needed to Know Free sample: the foreword, the introduction and the first chapter, on learning how to learn. 2025. Free sample: PDF · EPUB
  4. 4.
    Building PowerShell Modules, Brandon Olin: An in-depth guide from design to production Free sample: the front matter, with a chapter-by-chapter roadmap, and the start of chapter one. 2021. Free sample: PDF · EPUB
  5. 5.
    Four-Phase Orchestration, Owen Heaume: Engineering Idempotent PowerShell for Windows Endpoint Automation Free sample: the preface and the first chapter, on the four symptoms of a procedural script. 2026. Free sample: PDF · EPUB
  6. 6.
    The DSC V3 Handbook, Gijs Reijn Free sample: the first chapter, on installing the tool and how version 3 came about. 2025. Free sample: PDF · EPUB
  7. 7.
    ChatOps the Easy Way, Brandon Olin: PowerShell Automation Through Chat Using PoshBot Free sample: the preface, the introduction and the first two chapters. 2019. Free sample: PDF · EPUB
  8. 8.
    #PS7Now, Jeff Hicks: A Blogger's Guide to Getting Started with PowerShell 7 Free sample: the front matter, the foreword and one article, on experimental features. 2020. Free sample: PDF · EPUB
  9. 9.
    The Complete Powershell Training for Beginners, Abdelfattah Benammi: Start from absolute zero, and learn to use the Windows Powershell as it was meant to be used Free sample: the opening sections on the console and on finding commands. 2020. Free sample: PDF · EPUB
  10. 10.
    PowerShell 101, Mike F. Robbins: The No-Nonsense Guide to Windows PowerShell No sample: from the description and table of contents. 2026.
  11. 11.
    Notes From the Field: A PowerShell Primer, Damian Scoles No sample: from the description and table of contents. 2020.
  12. 12.
    Powershell Programming in 2026, SouthStone Publications No sample: from the description alone. 2026.
  13. 13.
    The PowerShell Practice Primer, Jeff Hicks: 100+ Exercises for Improving Your PowerShell Skills No sample: from the description and table of contents. 2024.
  14. 14.
    PowerShell Guide to Python, Prateek Singh: A Comparative Approach to Learn two Scripting Languages at once. Fast! From the description and table of contents. 2019. Free sample: PDF · EPUB
  15. 15.
    PowerShell to C# and back, Prateek Singh, Deepak Singh Dhami: A journey to C# and becoming better at PowerShell From the description and table of contents. 2022. Free sample: PDF · EPUB
  16. 16.
    Building a PowerShell Tool, Adam Bertram: A Mini-Course No sample: from the description and table of contents. 2019.
  17. 17.
    PowerShell Tips to Write By, Adam Bertram: Building better PowerShell scripts one tip at a time No sample: from the description and table of contents. 2020.
  18. 18.
    Real World PowerShell, Joe Acosta No sample: from the description and table of contents. 2021.
  19. 19.
    POWERSHELL 101 GETTING STARTED WITH FUNCTIONS, ATA Learning, Samuel Ogunleke No sample: from the description alone. 2022.
  20. 20.
    PowerShell: From Zero to Deep Dive with Function Parameters, ATA Learning, June Castillote, Stuart Squibb No sample: from the description alone. 2022.
  21. 21.
    PlatyPS, Gijs Reijn: Your guide to PowerShell documentation No sample: from the description and table of contents. 2025.
  22. 22.
    Modern IT Automation with PowerShell, The DevOps Collective, Inc., Michael Zanatta: Modern Automation with PowerShell From the description and table of contents. 2022. Free sample: PDF · EPUB
  23. 23.
    POWERSHELL REMOTING EVERYTHING YOU EVER WANTED TO KNOW, ATA Learning No sample: from the description alone. 2022.
  24. 24.
    The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Users and Computers, ATA Learning, Adam Listek, June Castillote No sample: from the description alone. 2022.
  25. 25.
    The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Groups, ATA Learning, Faris Malaeb, Stuart Squibb No sample: from the description alone. 2022.
  26. 26.
  27. 27.
    The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Group Policy, ATA Learning, Emanuel Halapciuc, Chaitanya No sample: from the description alone. 2022.
  28. 28.
    The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Infrastructure, ATA Learning, Anthony Metcalf, Emanuel Halapciuc No sample: from the description alone. 2021.
  29. 29.
    The ATA Guide to Managing (And Scripting) Active Directory on the Command Line: Change Tracking and Health Monitoring, ATA Learning, Faris Malaeb, Alex Asplund No sample: from the description alone. 2021.
  30. 31.
    ConfigMgr - An Administrator's Guide to Deploying Applications using PowerShell, Owen Heaume No sample: from the description and table of contents. 2020.
  31. 32.
    WinGet and Beyond, Gijs Reijn: Mastering Windows Package Management and more No sample: from the description and table of contents. 2025.
  32. 33.
    Practical PowerShell: Exchange Online, Damian Scoles From the description and table of contents. 2024. Free sample: PDF
  33. 34.
    Practical PowerShell: Security and Compliance Center, Damian Scoles From the description and table of contents. 2024. Free sample: PDF
  34. 35.
    Practical PowerShell: Exchange Server 2016 Second Edition, Damian Scoles, Dave Stork From the description and table of contents. 2020. Free sample: PDF
  35. 36.
    Practical PowerShell Exchange Server 2019, Damian Scoles From the description and table of contents. 2024. Free sample: PDF
  36. 37.
    Exchange Server Subscription Edition PowerShell, Damian Scoles From the description and table of contents. 2026. Free sample: PDF
  37. 38.
    The Microsoft DSC Handbook, Gijs Reijn No sample: from the description and table of contents. 2026.
  38. 39.
    Enforcing Compliant Configurations, Dave Kawula, Cary Sun, Emile Cabot, Cristal Kawula No sample: from the description and table of contents. 2021.
  39. 40.
    PowerShell & Python on AWS, Rahul Sawant: Learn How to use PowerShell and Python on AWS No sample: from the description alone. 2022.
  40. 41.
    The PowerShell Conference Book, Mike F. Robbins, Mikey Lombardi, Jeff Hicks, The DevOps Collective, Inc. From the description and table of contents. 2018. Free sample: PDF · EPUB
  41. 42.
    The PowerShell Conference Book, Mikey Lombardi, Mark Kraus, Lanwench, The DevOps Collective, Inc.: Volume 2 From the description and table of contents. 2020. Free sample: PDF · EPUB
  42. 43.
    The PowerShell Conference Book, Mark Kraus, Michael Zanatta, Joe Houghes, Christian Coventry, Steven Judd, Phil Bossman, Adil Leghari, Arnaud Petitjean, Bill Kindle, The DevOps Collective, Inc.: Volume 3 From the description and table of contents. 2020. Free sample: PDF · EPUB

Further reading

Other books in the library on neighbouring ground, not cited above.

This is an article created from the free samples of 9 Leanpub books and the descriptions and tables of contents of 34 more. We're building these articles to provide you, the Leanpub reader, with a good jumping-off point to discover more Leanpub books that are interesting and relevant to you. We never use material which is paid-only when building these articles: we only use material which is already free on Leanpub. However, Leanpub authors can opt out from inclusion in articles from their book settings page.

Updated November 2026.

In the Leanpub store: 53 books in the PowerShell category · also filed under Windows Server

All topics