I maintain several computers that host several virtual machines. Every week I need to go out and update all of these machines. I need to know if any of the virtual machines were updated/rebooted and if the host machine requires a reboot. I then need to send a report for each host machine so that if the host has been rebooted, I can go in and restore the virtual machines.
The problem is that I need to set each system up manually. Every single host and VM iteration needs several variables to keep track of what is going on. This is painful, especially when a new machine is added. Here is what I am looking for.
I would like a host iterator that has all the host computer names. I would then have a VM iterator for each host. The variables would pick up the names from the list and be automatically set for each iteration. For example, host1 could have host1_result, host1_reboot, host1_VMs_Rebooted. Then the next iteration would be host2, host2_result, etc. The same would be the case for the virtual machines.
These variables are used in the monitor output as well as in logical operations at run time.
I hope this makes sense because it would really make my life easier. These temp variables would not have to be predefined and would be thrown out after the program run completes. I would just need to setup the template for each master variable.
Thank you for your consideration.