VMware Cloud Community
Fnilsen80
Enthusiast
Enthusiast
Jump to solution

Script to export VMs from vCenter - including Folders / Folder path

Is there a way/script to export all VMs from a vCenter with "all common" data as, name, state, space, vcpu, mem, uptime etc...AND which folder the VM resides in?
If I (in GUI) manually export data in the VMs view, I can select all these parameters, but NOT the "Folder" option.


I need a list (csv?) of all VMs with this info:

Name - State - Status - Host - Cluster - Provisioned Space - Guest OS - Memory Size - CPUs - Uptime - IP Address - DNS Name AND Folder

This is so I can sort out and sum up resources for all VMs in for example the "Development Team" folder

Any bright ideas?

Reply
0 Kudos
21 Replies
LucD
Leadership
Leadership
Jump to solution

Strange, works for me.
Then I'm at my wit's end I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Fnilsen80
Enthusiast
Enthusiast
Jump to solution

I'll do some more testing, but I am more than helped! You're a wizard 🙂

Thanks a lot.

Reply
0 Kudos