I would have something like that as out:
Can you give me the script to have a such out on my screen ?
Can I also have only REdhat for ie ?
Thx very much
In the future, you may want to be more descriptive in the request than "just give me a script" ....
There's a lot more than just a script, what language are you looking for? Where you do plan on running this script?
I'll throw out an potentially solution as this is a very generic request.
Here is a vSphere SDK for Perl implementation which retrieves all VMs connected to either a vCenter server or ESX/ESXi host and prints out the VM shell name, the hostname if known and the OS type. You will need to use either the vCLI for Linux or Windows or use vMA.
Here's an example output:
[vi-admin@scofield ]$ ./getVM.pl --server esxi4-1.primp-industries.com --username root vs-manager vs-manager.primp-industries.com Other 2.6x Linux (32-bit) vShieldB vshieldb.primp-industries.com Other 2.6x Linux (32-bit)
If you're interested in getting started with vSphere SDK for Perl, here is a good post that provides some steps with lots of sample code - http://www.virtuallyghetto.com/2010/05/getting-started-with-vsphere-sdk-for.html
VMware vExpert 2009,2010
If you find this information useful, please award points for "correct" or "helpful".