VMware Cloud Community
Yacc
Contributor
Contributor
Jump to solution

Automatically get a list of installed virtual machines

Hello,

After selecting the root "Host & Clusters" in VMware Infrastructure Client I open "Virtual Machines" tag and I got list of all machines. Then with clicking right button of mouse I open local menu and have option "Export List...", so I can export it to text file. Of course, I must make it manually. Is there a possibility to automatize this behaviour? I mean I'd like to get this list of servers every day, let's say at 1PM. It should be automatically created for example as text file on esx server or sent to me as email. Is this possible from VMWare Infrastructure Client or esx server?

Yacc

0 Kudos
1 Solution

Accepted Solutions
AntonVZhbankov
Immortal
Immortal
Jump to solution

You can install it even on your desktop. But you need Microsoft Powershell to work with it.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda

View solution in original post

0 Kudos
8 Replies
AntonVZhbankov
Immortal
Immortal
Jump to solution

You can easily do it with VI Toolkit (Powershell).

>get-vm


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
Yacc
Contributor
Contributor
Jump to solution

Thank you for the answer! I've just downloaded VMware Infrastructure Toolkit for Windows 1.5 - is this what you mean? How should I install it - just on VMWare Infrastructure Client?

Yacc.

0 Kudos
AntonVZhbankov
Immortal
Immortal
Jump to solution

You can install it even on your desktop. But you need Microsoft Powershell to work with it.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
runclear
Expert
Expert
Jump to solution

as Anton said, get the VI tool kit (install this after you install powershell)

then run >get-vm if you want the list exported.. you can do something like,

>get-vm | export-csv -path c:\file.csv

and presto, you will have your list.

-


-------------------- What the f* is the cloud?!
Yacc
Contributor
Contributor
Jump to solution

Thank you very much. I've installed Windows PowerShell and then VMWare VI Toolkit and it works correctly.

Yac

0 Kudos
vcpguy
Expert
Expert
Jump to solution

Though, we can get the excel file by this command, but still formatting wise, it is not the same, what we can get via VI Client and also how to make a schedule task so that this cmd runs at a pre-defined time?

Thanks

----------------------------------------------------------------------------- Please don't forget to reward Points for helpful hints; answers; suggestions. My blog: http://vmwaredevotee.com
0 Kudos
Yacc
Contributor
Contributor
Jump to solution

For the first part of your question, I've found the following thread: http://communities.vmware.com/thread/221214

For the second part, you can for example use Windows Scheduler and run the script at given time.

Yac.

0 Kudos
ippup
Contributor
Contributor
Jump to solution

is there any way to get a list of VM's from linux ? (ViMA?)

0 Kudos