Hello:
I am wondering if there is a way to find VM's (esx's, datastore's, folder's, pool's and etc.) ID by name from vSphere Power CLI.
The goal is to find ID of VM if name if known (and the same for esx, datastore, folder, pool and etc.).
Thanks,
Olegarr
Hi,
As per my understanding, we can get managed object ID of VMs,
$serv = Connect-VIServer -Server
Write-Output $vm.Id
Similarly with others, like first Get-VMHost, store it to a variable then variable.Id gives you the Id.
Hope this helps.
Hi,
As per my understanding, we can get managed object ID of VMs,
$serv = Connect-VIServer -Server
Write-Output $vm.Id
Similarly with others, like first Get-VMHost, store it to a variable then variable.Id gives you the Id.
Hope this helps.
Jeveenj,
Thanks a lot!
It actually helped a lot!!!
olegarr
Have you looked at the powercli command reference (Clicky)?
It's very straightforward, I'm not entirely clear exactly what you're
trying to achieve but more than likely it's the get-vm commmandlet tree
you'll be looking at.
from http://serverfault.com/questions/104565/find-vms-datastores-folders-pools-and-etc-id-by-name
Starwind Software Developer