I have been struggling with this task for months since my boss gave it to me, so I'd like to hear from the rest of you SCVMM 2012 admins. Brief back story, we have used SCVMM 2012 since RC for the purpose of creating private clouds using beefy servers we build to enable our developers and engineers to provision development machines without waiting for IT to have to set one up. It has taken off and been a huge success in our organization, we now have 4 private clouds serving 4 offices and 9 Hyper-V hosts divided between those clouds with just under 300 VMs and growing every day. Up until now we have relied on the end user to delete the VM when they are finished working with it but my boss would like me to implement a more automated way of cleanup.
I have tried accomplishing this using PowerShell and orchestrator. The problem I have is the modifiedtime attribute using the VMM cmdlets seems to update with the Hyper-V heartbeat so whether the machine is in use or not it claims the last modified time was 5 minutes ago. If I go and look at the modified time in windows of the VHD it will show the accurate time and date of the last time the VM actually was turned on and used.
So short of e-mailing 250 end users asking if they are still using their VMs, has anyone come up with a better way of automating the cleanup and management of their private cloud environments?