We have in our environment users while decommisioning/deleting the vm from VI Client they deleted by removing the vm from Inventory rather than delete from Disk and due to this lot of VMDK still existing in data store folder unused.Is it possible to find the through powercli how many such VM/vmdk existing in the datastore folder which are not being used.Any help on this will be greatful. Thanks
I would like to say Thanks to both of you.But LucD i have question i need to find out such orphaned vmdk/vm and then need to compare to our internal DB to check when its was decommisioned and then delete it to avoid mistake.So is it possible to get list ? Many thanks !!
I am waiting for your reply.Is it possible to get the list of Orphaned vmdk or can we modify (Alan) vCheck script to list out Orphaned or zombie vmdk file with path in the data store. Thanks !!
You can easily list the paths.
Just call the function and export to a CSV file
Remove-OrphanedData | Export-Csv .\report.csv -NoTypeInformation -UseCulture
As long as you don't add the -Delete switch, the function will only list the orphaned files and folders.
Thanks for prompt reponse. Is it possible to list out full script with the modified line "Remove-OrphanedData | Export-Csv .\report.csv -NoTypeInformation -UseCulture"
Thanks !! LucD
Just to confirm it will not delete the Orphaned vmdk rather it will list out in csv format ?I want to delete after confirmation whether there was any change control raised for deleting vm (Decommission VM) but some how missedout.