Get IE version from command line

Introduction

When trouble shooting remotely, it can be difficult to talk the user through certain things like getting the version of Internet Explorer. For a number of reasons, it can be a lot simpler to connect to their PC via PsExec and pop in a few commands to bring up the required information.

Certain internal sites will only work on very specific versions of Internet Explorer. So, how do you check the version of Internet Explorer from command line?
Well, I'm glad you asked...

This script will read 1 or more lists of computer names (hey, built once, used for many things) and get the info for you. It builds a CSV with the computer name and version. One thing I found based on comments above, is that if you have any machines running pre-IE9, the svcVersion doesn't exist.

The American scientist Paul Ehrlich once said, "To err is human, but to really foul things up you need a computer." At risk of hyperbole, it is my humble opinion that a greater truth has never been uttered.