powershell troubleshooting guide

I have been asked recently by “Pack Publishing” to write a review on their latest PowerShell book called PowerShell troubleshooting guide written by Michael Shepard.

I have read the book in the electronic format, so i cannot comment on the size, global aspect and other physical information that is related to the print copy. I can (and will) talk about it’s content.

Global overview:

I almost buy every PowerShell book that get’s out. I like to be up to date with my knowledge, and try to know the latest of the latest before everybody else. A lot of the books I have read before (the “best sellers”?) are very often written by the same authors. Having the opportunity to read this book from Michael Shepard (Which I didn’t know until then) is also another very important point for me. It gave me some ‘fresh air’ and another author to read and learn from (when they are not french or German).

The book is composed of 8 chapters for a total of 195 pages. If you compare this book to other ones focusing on the powershell topic, it is fairly small book. The text is easy to read and the powershell examples are clear and easily understandable.

Most of the examples are based on real life scripts from Michael shepard and can easily be re-used in your own scripts (such as Test-TCPConnection). The only little thing is how some of the script examples get sliced and spread over on 2 pages. This is of course not a big deal, and most likely only a personal preference.

 

About the author:

Michael Shepard has been working with computers since the early ’80s, starting
with an Apple II in school and a Commodore 64 at home. He started working in the
IT industry in 1989 and has been working full-time since 1997. He has been working for Jack Henry & Associates, Inc. since 2000. He has had various roles in that same company, but Michael started his career as a Database programmer. Michael also blogs on thepowershellstation.com, so don’t miss it.

For many of us, we just came into powershell just by luck, or the door was open, pushed, forced, wanted to, needed to, evolved from VBS etc… A lot of different reasons could have pushed us here, but the most of us are system engineers, or system admins. Even though we have been learning some development at school, some of us just didn’t use it anymore. PowerShell was actually a great way to get (a little) back to it.

System engineers are not developers actually, scripters are also not developers. There is some knowledge that we do not necessarily have, that developers have. Things on how to work efficiently with code, how to make it resilient. How to back it up. How to work with several persons on the same code etc…

This is what in my opinion makes a big deal, Michael has this developer experience, and bring it to us in a way that after reading this book, we will not simply write smart scripts, but also organize our code smartly. And that, for me, is was very valuable.

 

Content:

When I actually got asked to read this book, I thought to my “What more to learn in troubleshooting Powershell scripts than the regular technics such as break points, try catches etc..?”. Actually, a lot!

[stextbox id=”note”]I would like to highlight one important point: The title. Indeed, the title of the book can lead us a bit in the wrong direction since I thought It would focus only on PowerShell Troubleshooting. This meant in my head on how to find errors in my scripts and correct them. Indeed, there is actually an entire chapter that covers this, but there is definitely more to this book then what the title actually is suggesting you. It is actually not so obvious and needs to be mentioned in my opinion.[/stextbox]

The devops concept is (implicitly) covered in this book. We learn a lot on how to work with powershell code in a way that developers would tend to work with it. This means, concepts such as best practices for writing code in general is, up until how to organize your your code into modular sections for better re-usability are covered.

As mentioned in the introduction, the book is 195 pages thick and the content is divided in 8 distinguished chapters. In order to give you an insight of the book, without spoiling you the fun of it to much, I have put the high overview of the table of content here under.

  1. PowerShell Primer
  2. PowerShell Pecularities
  3. PowerShell Practices
  4. PowerShell Professionalism
  5. Proactive PowerShell
  6. Preparing the scripting environment
  7. Reactive practices – Traditional debugging
  8. PowerShell code smells

The chapter organisation is actually pretty good, and for once, you will not go through only technical points. Michael does actually a good job in pin pointing some organisational things out that should be taken care of.

The book highlights the key concepts for troubleshooting and organizing your code. The troubleshooting parts will help you understand, or enhance the following points:

  • How to find errors in your script
  • How to avoid to make errors in your script
  • How to avoid to the most common mistakes by respecting some good practices.

Organisational wise Micheal will guide you through the following concepts:

  • How to organize your code intelligently
  • How to make your code resilient
  • Some best practices to follow.

Conclusion:

To sum things up, I think that this little book is quite interesting. Even though I got asked to read it, I still learned a lot from it. If you are not to short on a copple of euros I would say go for it. You might even be lucky and get one of these amazing promotional offers from PacktPub.

 

 

By | 2016-10-19T21:00:14+00:00 January 15th, 2015|PowerShell, review|0 Comments

About the Author:

Stéphane is a dynamic and passionate Cloud and datacenter Microsoft MVP since. He is the founder of the Basel PowerShell user Group (BPUG), the co-founder of the French Speaking PowerShell UserGroup (FRPSUG), author, blogger, and received the community award "PowerShell Hero" from PowerShell.org. Stéphane has implemented microsoft infrastructure solutions in various countries of Europe and is currently working in Basel / Switzerland. Stéphane help his clients to reduce their global infrastructure costs by implementing Microsft infrastructure solutions by combining great products such as System Center, Windows Server, with heavy automation using Windows PowerShell. Stéphane loves languages, Belgium beer, French cheese and French Wine. If any of these topics are of your interest, don't hesitate to come and say hi.

Leave a Reply

%d bloggers like this: