Eric Ligman’s FREE Microsoft eBook Giveaway–Revising the download script

Every year, Eric Ligman, director of Sales Excellence for Microsoft, creates a blogpost in which he gives away tons of FREE Microsoft eBooks. This year has 361 in the list.

You name it, it’s in the list. SQL Server, Azure, PowerShell, .NET, BizTalk, SharePoint, Windows Server, and more. You can find Eric’s post at:

While there are individual links to each file, what if you want every one of them? He explains on the post why he doesn’t provide a big zip file. He does, however, provide a PowerShell script (attributed to David Crosby) that will do the job.

However, I found some issues with the script. Not that it didn’t work, it did, but there were several things I felt could be done to improve it.

First, there was no progress message issued during the download. As a user, I had no idea which file I was on, so had no concept of how much longer it would take. Thus, I’ve added a little progress message.

I then thought “Hmm, what if my downloads were interrupted, I don’t want to have to start all over”. So, I added some code that sees if the file we’re downloading already exists. This way it won’t re-download a file it already has.

But then another problem arose. What if it had partially downloaded a file? Just checking the file names wouldn’t catch that. So I added further code to compare the file size at the source with the file size on disk. If different, then it will re-download.

So far so good, now it will skip the file only if the file name is already on the local disk, and the file sizes match.

I now encountered my next concern. Crappy internet. I live out in the country, and while I love my privacy and rural living, my internet sucks. It is prone to go down or drop packets. If it had issues during a  download I didn’t want it to crash, but instead go onto the next file.

Thus I added a try/catch error handler, which displays an error message and continues on.

At this point I thought I was done. Just I was about to call it finished though, a typical afternoon Alabama thunderstorm came up. Kaboom! House rattled and power blinked.

This presented my final concern, what if the power went out? I’d want to know where it got to with the downloads. So I added some further code such that when the downloading starts it creates a new log file and appends each message to it.

I realize some of you have superfast gigabit internet and will be able to download these almost instantly. (I hate you by the way. #jealous). Therefore I made logging optional, so it wouldn’t create an extra file if you didn’t want it. Just set the $log variable to $false, and it will skip logging.

So there you go, a revised download script that will handle stopping and restarting the script gracefully, will look for errors, and adds logging so you can track progress.

You’ll find the revised script on my GitHub site, in the PowerShell folder:

Just look for the file “Eric Ligmans Microsoft eBook Giveaway Revised Download Script.ps1

There’s also a readme style file by the same name, which echoes this blog post.


The Phoenix Project

Just wanted to take a second during my lunch break to let you know about a book called “The Phoenix Project”. Back in ancient times, the 1980’s, a man named  named Eli Goldratt wrote a book entitled “The Goal”. It was about applying a concept called “Theory of Constraints” to the manufacturing process. But this wasn’t a boring textbook, but instead written as a novel. At the time a new concept, in the time since it was published the Theory of Constraints has become integrated into almost every manufacturing operation around the world.

“The Phoenix Project” takes the concepts of The Goal and updates them with new management techniques like Agile and Kanban, then applies them to the crazy world of IT. And just like in The Goal, The Phoenix Project uses the form of a novel to tell the story.

Bill is a newly minted VP of IT for Parts Unlimited. Bill inherits a mess, a project pivotal to the success of the company dubbed The Phoenix Project is over two years late and out of control. Not only that, operations in general is in a shambles. Bill is given just a few months to fix it, or the entire IT division will be outsourced.

Paralleling the goal, a mysterious figure steps in to mentor Bill. Using the Socratic method, he guides Bill in the application of Theory of Constraints, Agile, Kanban, and other techniques to the world of IT. Along the way Bill shifts the organization from a silo model of Dev, Operations, and Projects to the unified model known as DevOps.

So why am I delaying my lunch break (my lovely wife makes a killer cube steak) to blog about this? Well until Midnight, Wednesday April 3rd you can get the book for FREE in Kindle format from Amazon:

I had actually paid good money and loved the book so much I’d already started this review post, now that it’s free I’m happy to share with all of you. It’s not a long book, I read most of it on a Friday evening and finished it up on a Saturday. Since finishing it I’ve begun applying some of the concepts to my personal and professional life with good results. If you happen to run across this post after April 3rd I still recommend getting it, even if you have to pay for it like I did. It is well worth your time and money.

Don’t have a Kindle? No problem, there is free Kindle software for all the tablets; iPad, Android and yes even Surface. No device? There’s also a Kindle app for your PC and Mac. If all else fails, there’s even a cloud reader so you can read your books on any web browser.

If you want to know more about DevOps, the authors (Gene Kim, Kevin Behr, and George Spafford) run a website called IT Revolution at where you can find out more.

This is a great book that should be required reading for everyone in IT. I believe it will have as big an impact to IT as The Goal did to manufacturing. And if you haven’t read The Goal, get it as well, perhaps even read it first. The Phoenix Project makes several references to The Goal, which will make more sense if you read The Goal first. (The Goal is also available as an audio book from Audible, I’m hoping the Phoenix Project will be converted to audio soon.)

Enjoy, now if you’ll excuse me I have a cube steak with my name on it.

T-SQL Tuesdays–Resolutions

There’s a new meme going around the SQL Server blogosphere called T-SQL Tuesdays. A bunch of SQL Bloggers all post about the same SQL related topic on the same day. Back at the beginning of January fellow MVP Jen McGown (blog | twitter) wrote a blog post about resolutions for the new year. Granted I’m way too late to be included in that round of SQL Server related Tuesdays, but thought it was a great idea and wanted to put up my resolutions. Since it’s February it’s a little late for new years, maybe we can call them Ground Hogs’ day resolutions?

Produce more variety – I’ve been doing a lot of content for Pluralsight, I want to continue putting out good content for them, but want to put out other content as well. I want to try and blog more, and hope to self publish a few books on the Kindle platform.

Consume more – As much as I love to produce content, I recognize that I need to do a better job of consuming more. My Kindle has been a big help with that, having a huge library available all the time has made it easy to switch between the subjects I want or need to learn about.

Balance my consumption – While I love technical books, I realize to be a true professional I need a good balance. I’ve started reading a lot of what I call “professional” books. Books that give me insights into things like business, community, time management, and teamwork.

Better balance of family life – Let’s face it, us really aggressive type A folks work a lot. When we’re not doing our 9 to 5 job we’re producing content like blog posts, books, videos, or are off at some user group meeting or weekend event presenting. This has a definite impact on the family. While my family is incredibly understanding, we still miss each other. So I’m working on some creative solutions to this issue.

Get my next certification – Last year I earned my MCTS for SQL Server 2008 Business Intelligence. This year my goal is to advance that and earn my MCITP also in SQL Server BI.

More Beta work – The CTP for the next version of SQL Server is now out. I want to spend more time working with it so when the final version is ready I’ll be well up to speed, plus better able to share the new features with the community.

I suppose this list is identical to the list of many people. but if I put it in writing I’ll be able to both measure it and hold myself accountable.

Step 2 – Learn iteratively

There are many ways to learn. Attending a presentation or live webcast is great because you get what I call “condensed knowledge”. You get the results of someone else spending thirty to forty hours of learning and working to condense it into a one to two hour presentation. You also get immediate feedback, you can interact with the presenter and ask questions. On the downside, if you missed something, you missed it (unless the presentation is recorded). These are great for getting an overview, however you won’t really get deep technical understanding out of a presentation like this.

The next step beyond a live presentation is a recorded webcast or video, such as those produced by DNRTV. These are great because you can pause them, rewind, and listen multiple times. However, you lose the ability to get immediate feedback from the presenter, and like live presentations it’s condensed knowledge.

Online reading is the next area available to us for learning. Blogs, MSDN, TechNet, etc. These have a much deeper level of information than previously mentioned formats. Plus they tend to be updated as changes are made. However, there do tend to be some limitations. Content is not quite as polished as a book as often it does not go through professional editors. Also, while the content will be more in depth than a presentation, it will still be limited in scope. It will be rare to find the equivalent of a book given out for free in a blog. Most of the time it will be equivalent to a really long magazine article.

This then, brings us to good old fashioned books. For true topical mastery, there’s nothing like a good thick book filled with code examples for learning. Some pundits are already predicting the death of the print book. However, in my opinion print is simply a medium. Books could be read online, or downloaded to something like a Kindle. Whatever the form, it’s still an in depth presentation of content.

So does this mean you should favor books over other forms of learning? Absolutely not. If you recall yesterday’s post, I mentioned being able to keep up your base. Podcasts, webcasts, user groups, and blogs can be great ways of doing just that, while using books for honing your expert skills in some topic.

Deciding on a delivery mechanism for your learning is the first step. Now you need to decide the process. Learning is a gradual process. It takes learning a little something every day for it to take hold. Even as little as 20 minutes a day can rapidly bring your understanding up to new levels. Avoid cramming, cramming works for short term but studies show long term retention is not good. For ultimate learning, start with a goal. Decide what you want to know. Then gather the materials you’ll need: books, articles, manuals, blogs, etc. Next, schedule the time. As I mentioned you want at least 20 minutes a day devoted to learning. Turn off your e-mail, close your twitter, turn off the radio, close the home office door, and focus on the material.

Practice what you read as well. Type in the code samples, run them, debug them, step through the code line by line. Make changes and see how it affects the flow of the code. Find the patterns and practices for your environment and try them out.

Using an iterative process you will soon be on your way to expert level knowledge.

Arcane Review: Expert SQL Server 2005 Integration Services

If you recall my “Good Reads” post from June 25th, you will remember I am a big believer in books as a learning medium. I like to employ a lot of different ways to learn: user groups, blogs, podcasts, videocasts, and magazines to name a few. But for really in depth coverage, it’s hard to beat a nice book in your hands. I got some good feedback from my mention last week of Andy Leonard’s new e-book on Data Dude, so I thought that I would continue by adding book reviews to the blog every so often.

Expert SQL Server 2005 Integration Services For this review I thought I’d cover a book that seems to constantly be on my desk lately: Expert SQL Server 2005 Integration Services, by Brian Knight and Eric Veerman. This book does a really good job and is specifically targeted toward the data warehousing professional. One entire chapter is devoted to ETL for dimension tables; another chapter focuses on the fact tables. It was great to have coverage so focused on these topics.

Another favorite part of the book is the two chapters on deploying and managing SSIS packages. So often these topics are glossed over, especially the managing piece. The book does a great job in covering all the tools and practices around this subject. I’ll mention one more chapter, one that focuses on package reliability. They cover logging, auditing, event handling, checkpoint files, and even suggestions on testing error handling logic.

There are many more chapters in the book, such as migration from DTS (SQL Server 2000) and Scalability, for you to discover. The other thing I love about this book is the brevity. The authors cover an amazing amount of information in just 382 pages. As a busy, busy person I very much appreciate the conciseness they achieved without sacrificing any clarity.

I’ve met both authors, and have heard them speak. They are both very nice, knowledgeable individuals, and I highly encourage you to attend one of their presentations if you get the chance, or if not at least buy their book from your favorite retailer; you will find it a great investment.