How to unregister register or restore lost, orphaned VMware VM virtual machine

1. Power down VM
1. Via ESX command line – sudo vmware-cmd -s unregister /vmfs/volumes/xxx_datastore/serverfolder/server.vmx
2. Via Virtual center use remove from inventory
3. Use Virtual center datastore browser, find VM
4. Select VM .vmx file
5. Select add to inventory
6. Complete wizard to add to appropriate datacenter, host, folder.
7. Check vlan information
8. Power on VM
9. Test access and networking