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
add comment

2 Answers

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
add comment

Agree with Chopper3.

Use PowerCLI and the following commands:

Connect:

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
add comment

Your Answer

 
discard

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