Here is how you can re-register an VM and template from Virtual center if you had removed or accidentally removed a VM from your ESs Inventory.

1st, you had to browse through the data store and look for the folder which contain the vmx or vmtx files. Once you had found the machine in the data store, just right click and select to add to inventory.

Choose the ESX host you would like to add for inventory. The entire process will be done in 1 min. Is simple and easy to do this through virtual center if you doesn’t want to perform this from command prompt.

Inventory - VM

Another alternative is using CLI – vmware-cmd command.
# vmware-cmd -l
/vmfs/volumes/47cba1df-343eb307-cf73-0015174a435a/GLDSTDW2K3/GLDSTDW2K3.vmx

Example: /usr/bin/vmware-cmd -s register

# /usr/bin/vmware-cmd -s register /vmfs/volumes/47cba1df-343eb307-cf73-0015174a435a/GLDSTDW2K3/GLDSTDW2K3.vmx

# /usr/bin/vmware-cmd -s register /vmfs/volumes/47cba1df-343eb307-cf73-0015174a435a/GLDSTDW2K3/GLDSTDW2K3.vmtx (register template)