Friday Fun Color My Web

Awhile ago I posted an article demonstrating using Invoke-Webrequest which is part of PowerShell 3.0. I used the page at to display the Print and MEAP bestsellers. By the way, thanks to all of you who keep making PowerShell books popular. My original script simply wrote the results to the screen. But I decided I wanted a way for my books to stand out so I made a slight adjustment.

The script still uses Invoke-Webrequest to parse out the page from But I added some logic to check each title for a keyword, like PowerShell. If found, I define a color variable and display the result using Write-Host and that color. If it isn’t found, the color is set to the current foreground color. This script will only work in the PowerShell console.
Now before anyone starts yelling about using Write-Host, yes I realize all I’m doing is writing to the screen. But in this situation I am fine with that. I will never have a need to do anything else other thank read the information and adding some color to it make it even easier.
However, I did add some flexibility by adding parameters to specify the key word and color. I set some defaults and included parameter validation. Here’s the default result:


But I can just as easily check for other values.


Obviously this script is really only useful to me or other Manning authors curious about where our books stand. But this is a Friday Fun article so I hope you picked up a useful tip or trick.

PowerShell Deep Dives is published!

PowerShell Deep Dives>At long last the PowerShell Deep Dives book, published by Manning, is a reality! The book is a collection of PowerShell nuggets, tidbits, tutorials and tips that you won’t find anywhere else. Even more importantly, this is a book with a mission. None of the contributors or editors receive any payments for the book. All proceeds go to Save the Children.

Print book should come out at the end of next week and ebook versions a few weeks later. Get yours today.

Half off Learn Windows PowerShell 3 in a Month of Lunches

Learn PowerShell 3 in a Month of Lunches Today, Learn Windows PowerShell 3 in a Month of Lunches is part of Manning’s Deal of the Day. This is the book for the absolute beginner and will teach you literally in a month of lunch breaks all you need to know to get started with PowerShell 3.0.

Not convinced? Take a moment to read the Amazon reviews. Even though you can probably get a good deal at Amazon, the Manning Deal of the Day is only good through their store. So visit the book’s page and use promo code dotd0404au when you check out to save 50%. By the way, this promo code also applies to¬†Learn Windows IIS in a Month of Lunches by Jason Helmick (

PowerShell Books Rule

021913_2047_WordTest1.pngPowerShell related titles continue to rule the roost, at least for Manning. Based on recent sales PowerShell titles occupy 40% of the top 10 list! I’m hoping this trend will continue later this spring with publication of the PowerShell Deep Dives book which is currently available as part of Manning’s MEAP.

As of March 14th here’s how PowerShell is dominating book sales:

Of course this doesn’t happen without you so a very big and sincere thank you. And if you are one of those people who like signed books, I think I can safely speak for all of my co-authors, that we’re happy to sign any of our books should paths cross at a conference, training session or user group meeting. If you are lucky enough to be going to the PowerShell Summit, this may be the only time this year where Don, Richard and myself will be in the same place at the same time.

Learn PowerShell 3 in a Month of Lunches now available

I am very happy to report that the new version of Learn PowerShell 3 in a Month of Lunches is now available from Manning. This is the second edition of the popular book originally authored by PowerShell legend Don Jones. Don invited me to collaborate on the second edition which covers PowerShell v3 and I am very, very happy with the result. I hope you will be as well.

This is the book to get you jump started on using PowerShell right away as a management tool with easy to follow lessons and labs that you should be able to finish over a lunch break. When you are finished with this, the next step is Learn PowerShell Toolmaking in a Month of Lunches which should also be out very soon. If you’d like to learn more about this book, get a sample chapter, download source code or the lab answers, click here. We’d also like you to post a brief video clip of your unboxing telling the world why you bought the book and what you hope to learn from it.

Thank you so much for your support and enthusiasm.