Windows PowerShell 2.0 Best Practices, by Ed Wilson with the Windows PowerShell Teams at Microsoft, is now available. Its ISBN is 9780735626461, and the book contains 656 pages.
I love the Best Practices titles. This series is not for the beginner; it is for the experienced IT professional–architects, engineers, administrators, and support professionals. Ed Wilson (aka the Microsoft Scripting Guy) is, without a doubt, the right person to guide you through the best practices for Windows PowerShell. To get the most out of the Windows PowerShell 2.0 Best Practices book, you need at least a basic understanding of Windows PowerShell: fundamental looping, constructs, the use of cmdlets, etc. If that’s you, you are going to want this book. Here is Ed’s description of the contents from the “Introduction” to the book.
This book is organized into five sections as listed here:
· Part I: Introduction
· Part II: Planning
· Part III: Designing
· Part IV: Testing and Deploying
· Part V: Optimizing
The first four chapters introduce many of the new features of Windows PowerShell 2.0. In Chapter 1, I cover a variety of the new cmdlets that are introduced in Windows PowerShell 2.0 as well as best practices for deploying Windows PowerShell 2.0 to different portions of the network. In Chapter 2, I discuss the new WMI features in Windows PowerShell 2.0 and provide tips for incorporating these features into a management strategy for your network. Chapters 3 and 4 cover Active Directory.
I begin the planning section of the book in Chapter 5 by identifying scripting opportunities. Here I talk about the different types of technology available to the scripter. In Chapters 6 and 7, I present best practices for configuring the scripting environment and avoiding scripting pitfalls. Chapter 8 concludes the planning section by discussing best practices for engendering scripting collaboration within the corporate IT environment.
In the section about design, I go into a great amount of detail about functions and help. There are significant new features in Windows PowerShell 2.0 that will ratchet your enterprise scripts to a new level of functionality. Chapter 11 covers modules, which are another new Windows PowerShell 2.0 feature that provides the ability to store, share, and deploy functions and other program elements in an easy-to-reuse manner. Because there are so many methods to get data into and out of a Windows PowerShell script, I provide some guidelines to help you determine the best methodology for your particular application. You cannot always predict what the environment will be when your script is run. Therefore, in Chapter 13, I discuss best practices for handling errors.
Of course, many errors can be avoided if a script is thoroughly tested prior to deployment, so I’ve included a section on testing and deploying. Script testing is discussed in Chapter 14, including the types of tests to run and the type of environment to use for your script testing. In Chapter 15, I discuss best practices for running scripts. Here I talk about working with the script execution policy, code signing, and other topics that are often confusing.
In the final section of the book, I cover optimization. In Chapter 16, I present different options for implementing logging in your script. I conclude Windows PowerShell 2.0 Best Practices with Chapter 17, where I cover the new troubleshooting and debugging tools included in Windows PowerShell 2.0. There are many choices for you to use, and I provide quite a bit of guidance, tips, and best practices to effectively troubleshoot a Windows PowerShell script.
Note Sidebars are provided by individuals in the industry as examples for informational purposes only and may not represent the views of their employers. No warranties, express, implied, or statutory, are made as to the information provided in sidebars.