VMware Cloud Community
TestADE
Contributor
Contributor
Jump to solution

VM's number by pool

Hello,

I did some investigations but i did not find a good answer to my problem (so i apologize if there is already a topic with the answer).

In the infrastructure we have many differents pools with few hundreds of VMs inside and I have to write a script that count the number of used VM and unused VM on each pool and export it inside a CSV.

I started using this command :

Get-ResourcePool | Select Name, @{N="VM#";E={$_.ExtensionData.Vm.Count}}

but i don't know to see unused VM and export the result in a good-looking CSV file.

I would appreciate some tips if someone can help me.

Best regards,

0 Kudos
22 Replies
LucD
Leadership
Leadership
Jump to solution

Does that mean they didn't install the optional PowerCLI PSSnapin on the Connection Servers?

I'm afraid I have no experience whatsoever with that uadv_vmware_view module.

Looking at the code in that module, it seems to return status and performance data for the View environment (which would be in line with what Nagios does).
The
Unofficial Advanced VMware View Powershell Cmdlets post is quite old, and several of the links in there point to non-existing pages.

Instead of trying to get these old, unsupported and unmaintained modules to run, wouldn't it be easier to install the PSSnapin on the Connection Servers?

Or even better, wait till you are on Horizon 7.* and use the latest PowerCLI version (with Horizon support)?


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

0 Kudos
TestADE
Contributor
Contributor
Jump to solution

Yes you are right but i can not decide that alone in my firm. Anyway, thank you for your help since the begining, i will try doing it after all.

Thank you again and have a nice day LucD

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Thanks, same to you.

And I hope you can enjoy the PowerCLI Horizon module soon :smileycool:


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

0 Kudos