When Lee Holmes asked me to write the introduction to the third edition of his Windows PowerShell Cookbook, I was deeply honored. I have known Lee for a long time, and we meet in real life every time I am out in Redmond, or when we happen to be speaking at the same conference. If you are like me, you already own the first two editions of this great book. You may even be asking yourself why you need a third edition of the same book, and I will tell you: this is not the same book. It is a completely revised book that takes advantage of the significant changes we have made to both Windows PowerShell 3.0 and to the underlying operating system.
Consider this: Windows PowerShell 1.0 had 129 cmdlets, but Windows PowerShell 3.0 on Windows 8 has over 2,000 cmdlets and functions. Because Lee’s book is so practical in nature—it is, after all, a cookbook—this means that with so many more ingredients to add to the recipes, the recipes will necessarily change. In addition, with the new functionality comes additional opportunities for new recipes.
More than just a cookbook, however, the third edition of the Windows PowerShell Cookbook is also a textbook of how to write great Windows PowerShell scripts. Just as a budding saxophonist benefits from watching a legend such as Charlie Parker ply his ax, so too does a budding scripter benefit from watching one of the guys who literally wrote Windows PowerShell write scripts. Each of these recipes is a perfectly crafted example of a Windows PowerShell script—your task is to study these scripts so you can go and do likewise.