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,