There haven’t been any new blogs on Hyper-V.nu in the past weeks because of …. you know … an absolute dearth of time. It so happened that my other Hyper-V.nu colleagues had the same luxury problem in these economical challenging times.
So while I was doing a lot of other things which I will soon be able to talk about, I asked my colleague Sander Klaassen to fill in the gap and write a guest blog. Sander is also a Microsoft virtualization enthusiast and combines this with his broad other expertise.
Please welcome our guest blogger Sander Klaassen!
Over de last years I developed a script to quickly scan a customer’s IT environment. Recently I added a Hyper-V module which collects data from Hyper-V hosts and VM’s. I showed Hans Vredevoort the output and he asked me to write a blog about it. I was not sure to share the code, because it isn’t very clean, since I only occasionally work on it.
I created a VBScript and not a PowerShell script because I wanted to be able to run it without installing anything, and VBScript is part of windows since Windows 2000 so it’s always available.
This is also the reason why I made this script besides the regular Microsoft scan tools like ACT and MAP. They all need installation of components or even agents.
I modified the script for this blog, I changed the script by requesting input in a text file instead of Active Directory. This text file is a simple list of machine names:
Save it in the same directory as the VBScript with the name “machinelist.txt”
The script queries WMI name spaces of each machine and when it finds the Hyper-V role, it collects the following information: