I have over 10 hyper-v images that I use for testing various projects. Some I use often some less so.
It is a lot of work starting each of the machines individually to run windows update.
I was wondering if there is a powershell script that could spin up each of the machines, run windows update on it and then close it down again?
If your VMs only include recent (Vista or later) Windows system, you don't need to actually start them to apply updates; you can do it directly to the offline .VHD files, by mounting them and using the
dism.exe
offline servicing tool;dism.exe
has several features, one of which is the ability to apply patches to an offline Windows image or VHD file.This very nice script should be able to automatically mount a VHD file, apply some updates to it and unmount it; I've not personally tested it, but looks like it should work:
http://gallery.technet.microsoft.com/scriptcenter/839ee6f0-196f-4ed7-ac55-8e753c5d5ebe
Not that I am aware of. This functionality is built into SCVMM, a non-free produce MS sells.
You might be able to do some sort of homebrew script (if I remember tomorrow I've got scripts for doing some other maintenance similar to this and will post them).