This is a bit of an old post but, just in case anyone else finds it on Google (as I did), I thought I'd point out that our company has created a tool which automatically documents Windows servers and workstations. It includes most of the information in the script above and more.
I hope it's...