PowerShell in Practice

Author: Richard Siddaway
Publisher: Manning, 2010
Pages: 500
ISBN: 978-1935182009
Aimed at: Admins wanting to automate
Rating: 3.5
Pros: Succeeds as a cookboook
Cons: Neither logical nor clear
Reviewed by: Alex Armstrong


This is a difficult book to review because it has some very good parts but...

 

Author: Richard Siddaway

Publisher: Manning, 2010
Pages: 500
ISBN: 978-1935182009
Aimed at:
Rating: 3.5
Pros: Succeeds as a cookboook
Cons: Neither logical nor clear
Reviewed by: Alex Armstrong

 

This is the first book to convince me that PowerShell is a good idea. The problem I've got with PowerShell is that it seems like overkill for a scripting language and insufficient for a full applications language. In short I've never been very sure why we need yet another programming language targeting admins and other casual programmers.

 

Banner

 

What this book does is to explain the PowerShell idea and give some of the history and motivation and this almost succeeds in persuading me that it is a useful addition to our toolkit.

Unfortunately when we hit Chapter 2 things start to go wrong.  The chapter on learning PowerShell only succeeds in confusing me - and I can already program in PowerShell. There is something about the author's style that results in a constant talking around the subject. And when the code if finally presented it seems to fall out of the blue and there it is.

To be fair much of the discussion is about finding out how to use facilities to find out about PowerShell - a sort of programming by discovery. But this doesn't seem like a good way to approach any logical task like programming. I'd much prefer a logical explanation of how things work than a "explore it and see" approach.

Chapter 3 continued to confuse me with an explanation of the tools I had to hand. Using .NET and COM objects mixed up with specific APIs such as ADSI and WMI. In nearly all cases the explanations were basically "this is complicated" and yes I have to agree that WMI for example is complicated, but there is a sort of logic behind it and this is just not revealed.

The same messy thinking is displayed in Chapter 4 where the methodology of building scripts is considered. Just because you are an administrator doesn't mean you can ignore the wealth of programming methodologies that there are and just settle for "ad-hoc". This is dangerous stuff and the warnings just aren't big enough.

The second section of the book deals with specific how-to areas. Dealing with user accounts, mailboxes and the desktop. The third section is about scripts for servers, working with logs, DNS, Active Directory, Exchange, IIS, and SQL server. The book closes with a look at innovations - new ways to use PowerShell.

This "cookbook" section of the book is probably the most successful in that it takes a standard form - set a problem - solve a problem. A brief discussion of the, usually short, code presented finishes the  recipe with sometimes a box out on some theory or a special point. Few of the solutions contain any serious programming a for loop or an if statement at most and are mainly about identifying the object, properties and methods needed to complete the task. Given that this subject is all about creating admin scripts this is probably how it should be - after all who needs a quicksort in an admin script.

At the end of the day this book fails to teach the reader how to write PowerShell scripts. It is not logical or clear enough for that. What it does succeed in doing is in presenting a collection of PowerShell scripts that do useful jobs. Consider it a cookbook and it's not bad - as long as you only want to do what it shows you or something very close.

Surprisingly, even though I didn't get on with this book at all well, I can recommend it if you want a PowerShell cookbook - in this role it is reasonably good.

Banner


Algorithms: Absolute Beginner's Guide

Author: Kirupa Chinnathambi
Publisher: Addison-Wesley
Date: November 2023
Pages: 416
ISBN: 978-0138222291
Print: 0138222290
Kindle: B0CCTZ37DQ
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank

Subtitled 'a practical introduction to data structures and algorithms in JavaScript', this book is split into tw [ ... ]



Learn Quantum Computing with Python and Q#

Author: Dr. Sarah Kaiser and Dr. Chris Granade
Publisher: Manning
Date: June 2021
Pages: 384
ISBN: 978-1617296130
Print: 1617296139
Kindle: B098BNK1T9
Audience: Developers interested in quantum computing
Rating: 4.5
Reviewer: Mike James
Quantum - it's the future...


More Reviews

Last Updated ( Friday, 06 August 2010 )