How to recover deleted or corrupt VMX file

In case you find yourself in the position where you have a vmware virtual machine, that for some reason lost it’s configuration file (.vmx), but you still have the vmdk files which go with the vm. Then you’re in luck , there is an easy way to recover the vm!!

Just start the “new vm” wizard and during the wizard, click edit hardware.Now delete the pre-added disk from your new vm, and click add disk.
Then choose existing disk. And browse your datastore for the vmdk from the broken vm.
Do this for all the disks that were a part of the vm.
Now just boot your newly created vm, and you will have your machine back!!!!