Richard's profileRichard Siddaway's BlogPhotosBlogLists Tools Help

Blog


    January 14

    Windows PowerShell Cookbook review

    Windows PowerShell Cookbook by Lee Holmes.  Published by O'Reilly ISBN0596528493

    Lee Holmes is a developer on the PowerShell team and is renowned for his blog at http://leeholmes.com/blog/.  This book has quotes on the back cover from both Jeffrey Snover and Bruce Payette and in one respect I'm afraid I have to disagree with both of them.

    Ha - bet that's got your attention!!

    The PowerShell Cookbook follows the format of other books in this series.  A set of short, very well explained answers (and in this case a script) to solve a particular problem.  The book comprises 26 chapters in four sections.  Part I covers a quick tour of PowerShell, what it is and what it looks like plus a few fundamental concepts.   Part II follows straight on covering how to use and configure your PowerShell environment, how to use the pipeline which is one of the most fundamental concepts in PowerShell and something that gives it much of its power.  This section continues with various language elements including looping and flow control, variables, strings, and maths.  Each of these sections is presented as a series of tasks - instant answers to the "How do I do....." questions.

    Part III is where the book really kicks in with chapters covering working with files, the Internet, scripting, arrays, user interaction, tracing and error handling and security among other topics. 

    The last third of the book covers using PowerShell with the file system, the registry, event logs, processes and services, Active Directory, Exchange 2007 and Operations Manager 2007. 

    In all of these chapters a set of problems are defined and then the PowerShell script that solves the problem is listed and discussed.  The problems are all real world examples of the sorts of things that users of PowerShell will find themselves needing to do.  Obviously not every possible situation can be covered but the examples are such that the concepts explained in the scripts can be applied to solve other problems.

    The book supplies scripting solutions to the problems - it does not assume that any of the PowerShell add ins or extensions are installed.

    The last 80 pages of the book cover a set of Appendices that are absolutely invaluable.  I could make a case that the book is worth buying for the appendices alone!  They cover

    • PowerShell Language and environment - one of the best quick reference guides I've seen
    • Regular Expressions
    • PowerShell Automatic Variables
    • Standard PowerShell verbs - no reason not to get your scripts named correctly now
    • Selected .NET classes and their uses - invaluable for someone starting to branch into .NET use with PowerShell, helps to find what you need to use in the mass of information available
    • WMI reference
    • Selected COM objects and their uses
    • .NET string formatting - best explanation I've seen
    • .NET date time formatting

    All in all this is a superb book and I would recommend it to anyone using PowerShell - newcomer or expert - you will find lots of useful information.  The expert user will be intrigued by some of the solutions - I know I found some ahhh - thats how that works type moments as I was reading.

    Buy it. Read it.  Use it.

    Oh you want to know my disagreement.  Both of those fine gentlemen said it should be on every PowerShell users book shelf.  I think it should be on your desk, open and in use.  Its the sort of book you keep turning back to - "Now how do I do that again.........".  There that wasn't so bad.

    Superb book. And the script examples can be downloaded so you don't need to type them in.

    Technorati Tags:

    Comments (3)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Ted Strandwrote:
    I totaly agree!!  I have this book, and it is my primary reference for PowerShell.  I learn better by example and by solving problems that I need to reslove today.  I will admit that I like the format as I have several others in the series.
     
    -Ted-
     
    Jan. 21
    Picture of Anonymous
    Lee wrote:
    Thanks for the comments!
     
    Lee
    Jan. 16
    Excellent point.  You are correct - the book should be on your desk.
    Cheers!
     
    Jeffrey Snover [MSFT]
    Windows Management Partner Architect
    Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
    Jan. 15

    Trackbacks (4)

    The trackback URL for this entry is:
    http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!1010.trak
    Weblogs that reference this entry