Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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.

share|improve this answer

Agree with Chopper3.

Use PowerCLI and the following commands:


Connect-VIserver <your VC/ESX host>

List all VMs and export to CSV file:

Get-VM | export-csv <filename>

Then, just replace Get-VM with Get-VMhost, get-datastore, get-folder, get-resourcepool, etc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.