Tuesday, 17 January 2017

Powershell - how to get virtual machine GUID / ID (easiest way) from the hypervisor

Hi,
Today, easy thing to manage, but of course - if you now how to do it.
To get VM ID from hypervisor, for example - to manage virtual machine from the powershell direct - you need to run simple command in the administrator session:

(get-vm virtualmachinename).id


2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Correct way is (Get-VM vmname).PersistentID

    ReplyDelete