The updates in this script function are the following:
I will not delete folders if they do not reside within a folder with the VM´s name (In the earlier version I just deleted and that recursive with no questions asked which could have some consequences )
And if the folder was the default or named with another name you will get an output that tells you to clean manually
If you do not give the VM´s Name in the -Path parameter I will add that for you to get a nice and tidy folder structure
Here is a screendump on the updated function in action
And here you can see what happens if I move from a folder that is not named after the VM´s name
And here is a screendump of the folders that are left in the c:\vms that you need to manually delete and you might want to check that not another vm is residing inside these folders before removing them
Hello, I have a question about your function. Currently, i think it would do a good service to those admins who use live migration, whether shared stored in a cluster, or shared-nothing in a standalone sense. But how does it work when you run VMM 2012 SP1? How does VMM handle moves of machines? Does it leave directories behind too?
And if so, does VMM handle typical, user initiated VM moves differently than it does the auto-dynamic optimized moves that could happen up to every 15min?
Comments
Hello, I have a question about your function. Currently, i think it would do a good service to those admins who use live migration, whether shared stored in a cluster, or shared-nothing in a standalone sense. But how does it work when you run VMM 2012 SP1? How does VMM handle moves of machines? Does it leave directories behind too?
And if so, does VMM handle typical, user initiated VM moves differently than it does the auto-dynamic optimized moves that could happen up to every 15min?
[…] since the book got into production I have made an update to do some checking and not deleting to much that could happend in the first version! […]