How to register and unregister a VM in vmware esxi using cmd

You can unregister a VM from ESXi directly using ESXi Host Shell / SSH (vim-cmd), vCenter will update automatically.

  1. List VMs:

              vim-cmd vmsvc/getallvms

Note the VMID.

  1. Unregister the VM:

vim-cmd vmsvc/unregister <VMID>

  1. Register:

              vim-cmd solo/register /vmfs/volumes/<datastore>/<vmname>/<vmname>.vmx

              You will need to know the datastore and VM names.

How to Lock Windows Computer from Command Line

 

In command line type:

rundll32.exe user32.dll,LockWorkStation

That will lock Windows.