Using PowerShell to convert ugly TechNet/MSDN keys.xml to pretty, easy to read keys.txt
February 16, 2010
posted by James Kehr
I love long titles. I wish more stuff had long titles.
Here’s the story. I have a TechNet account and I love pressing that “Get” link to generate as many keys as possible for every interesting product on the list. I’ll never use them all, but that has never stopped me from pressing the “Get” link.
The problem with being a “Get” link user is copying down all those keys. I thought up a myriad of ways to copy them all to an easy to read and search text document but too many of them involved a lot of manual work. Then I noticed, hidden on the top right of the Product Keys table, the “Export Key List to Xml” link, which became my new best friend.
Until I looked at the garbled, spaghetti coded XML nonsense that was generated by the “Export Key List to Xml” link. Spaghetti code…yuck. They didn’t even include meatballs.
Time to bust out the PowerShell!












