Human brains are funny things. At the end of the day, our brains are still wired the same way they were when we were cavemen trying to survive in the wild. Anything relevant to our immediate survival tended to "stick" in our brains, and anything not relevant tends to slip past. Tell a child, "don't touch that hot pot on the stove!" all you want to, they're still likely to touch it—once.

This book is the hot pot on the stove. It's a collection of mistakes, and an opportunity to solve them, albeit without burning your fingers.

In this book, I've collected edited versions of PowerShell questions and "broken" code, and in each chapter I'll present a one. You'll take the time to read the code, figure out the problem, and try to solve it. Then, I'll present a solution, along with a detailed explanation of not only what was wrong, but why.

This book is not a how-to, and I presume that you already have a decent amount of basic PowerShell education under your belt. This book is not about how to make Active Directory work, or Exchange Server, or SharePoint Server, or anything else; this is about PowerShell. So you're going to see problems that relate to the core of how PowerShell works. Many of these problems spring from "gotchas" in PowerShell, while others have their origin in very common misunderstandings about how the shell works.

If you feel that you learn best by getting your hands dirty, making mistakes, and figuring them out, then this book is for you.

And if you've ever wondered, "do I really know what PowerShell is all about?" then you can consider this book to be an ongoing quiz of sorts. Each chapter offers a new opportunity to test your PowerShell mojo, validate what you know, and perhaps pick up a new trick or two along the way.

NOTE: This is a "continually published" book. You purchase it once, but I'll be regularly adding new chapters. If you buy the book, you can permit Leanpub to notify you each time a new chapter is ready, giving you an ongoing series of challenges well into the future. My goal is to publish at least 12 chapters per year, or at least one chapter per 25 Leanpub readers the book has, whichever is greater.

Don Jones

Don Jones is a Windows PowerShell MVP, author of several Windows PowerShell books (and other IT books), Co-founder and President/CEO of, PowerShell columnist for Microsoft TechNet Magazine, PowerShell educator, and designer/author of several Windows PowerShell courses (including Microsoft's). Power to the shell!