MartyG
Contributor
Contributor

A way to check if the vmdk exists with powercli

Hi

We had an issue with a HPOO flow run in our enterprise. It was looking to delete phantom vmdk but it ended up deleting vmdk descriptor files. We found them by looking to see if capacitygb equaled 0. We are fixing the issue by fixing the descriptor files but came across a virtual server with normal capacity but the vmdk's did not exist.

Now I am worried how many more like this exist. Appreciate any thoughts on a script or one liner to see if the vmdk files exist for a flat file

thanks

0 Kudos
1 Reply
LucD
Leadership
Leadership

You can use the vimdatastore PSDrive and do a Get-ChildItem to get all the files, including the VMDK

I do something similar in my VMX Raiders Revisited post to find orphaned VMX files.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos