Windows PowerShell Cookbook 2nd Ed. – O’Reilly

Posted on April 17, 2011. Filed under: Technical book reviews |

At one time, there were command line scripts – .cmd files that were nothing more than commands available in the command shell to automate common tasks. Then came Java Script, VBScript, ports of shell tools and other languages to the Windows platform, such as Perl, and others.
Then, Microsoft Corporation made a huge investment into something code-named Monad. Monad was to be the answer to the shortcomings and the obvious security problems with the previous native tools in Windows. VBScript has some very big shortcomings, not as a language, because it was and is still pretty powerful. Security was not a baked in feature for VBScript and security is not something that any right-thinking person can afford to ignore any longer.

Then came Monad, and eventually the final name, Windows PowerShell. PowerShell provided for some unique solutions to some hard problems. The language is, first and foremost, designed to be as secure as possible. Specific policies are assigned to define what scope of script can run, based on its origin. If a script is not signed by certificate, it can’t run by default. If the script comes from a remote source, or a user attempts to run a script against a remote machine and the local policy of where the script will run does not allow it – the script cannot run.

But, we’re not here to talk about the in’s and out’s of PowerShell. We’re here to discuss the overall value of a given book – the “Windows PowerShell Cookbook, 2nd Ed.” Written by Lee Holmes and published by O’Reilly.

Before getting into the book itself, I’ve personally read and reviewed literally dozens of O’Reilly books over the years. And, there is one thing that is an absolute – if you are looking for the best books on the market for a given technology, and O’Reilly publishes it – buy it. From the perspective of accuracy, attention to the minutest detail, and the presentation of the subject matter, no one does a better job than O’Reilly. Obviously, there are professionals in every meaning of the word in all phases of the book process at O’Reilly. I can’t say enough about the people at this publishing house. So, I’ll stop, otherwise I’m going to start coming off like an O’Reilly tool. And, no one wants that.

Back to the “Windows PowerShell Cookbook”. The “Cookbook” series is one that, if not invented at O’Reilly, they have certainly perfected. More about the cookbooks in general in just a moment. We need to introduce and know our author. And, that’s important because the guidance that you get in this book is like having a member of the PowerShell development team guiding you into the solutions that will make you a PowerShell guru. Lee Holmes is that guy. He joined the team early on, and has been a constant and consistent advocate for community and users alike. Lee spends a lot of time on external (to Microsoft) forums and message boards dedicated to PowerShell users and developers. Lee isn’t just visible – he’s omnipresent. The same goes for his presence inside Microsoft. Frankly, with all of the time that Lee spends educating and helping internal Microsoft and external customers on how to use and extend PowerShell, it’s a wonder that he gets anything done internally.
OK, again – back to the book… (Wow – so many awesome things to be said about Lee and O’Reilly….)

The book is in a format that is solutions oriented. In essence, and this is the same for all of the O’Reilly cookbooks, what is a common situation or problem and how do we solve it? That’s the cookbook. A series of recipes on how to do a lot of things that might be common or uncommon – but still strive towards providing that simple and innovative solution. This is an 850 page book filled with all manner of solutions to nearly any topic you can imagine.

The book start out with Fundamentals, meaning nearly any level of user – novice to expert – can pick it up and start becoming more effective with PowerShell. It then moves into Common Tasks – those things that you do all of the time in PowerShell, for example, “How do I make my scripts user-interactive?” After the common tasks, Lee takes to into the Administrative Tasks. In the end, PowerShell is a scripting language that is designed to automate what the administrator or user does on their computer, servers, enterprise, and beyond.

After the work on the Administrator Tasks, Lee leaves you with a wealth of reference, ranging from the PowerShell language and the environment, to Regular Expressions, XPath, .Net Strings, .Net DateTime formatting, .Net Classes and their use, WMI reference, COM Objects and their use in PowerShell, Events, and finally (Whew!) the Standard PowerShell verbs.
And, the book goes so far to be sure that if you are on PowerShell 10 or 2.0 – you know what will work with each version of the language.

Ultimately, this book combines one of the most intelligent and outgoing individuals and let’s you inside Lee’s head for some of the coolest “How do you do this?” question and answer sessions possible. There are so many tidbits and cool little tips and tricks here that if you don’t find at least 50 of them applicable or inspiring in your own work – you aren’t looking hard enough or you’re being way to critical about what you think you know.

This book, in conjunction with Lee’s colleague Bruce Payette’s book (published by Manning, but don’t hold that against Bruce), “PowerShell in Action”, in my honest opinion gives you the best in theory and in application.


Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: