In our PowerCLI book we presented a Delete-Harddisk function in Chapter 7.
One of our readers asked if that function could be used to remove orphaned VMDK files from one or more datastores. Now unfortunately that is not the case since the function we presented in chapter 7 uses the ReconfigVM_Task method to remove the harddisk.
In the PowerCLI Community there are some thread that provide scripts to report on orphaned VMDK files, but most of these are quite old.
So I decided to write a new script that would report on orphaned folders and VMDK files and that would have an option to remove these folders and files.
Continue reading Orphaned files and folders – Spring cleaning