VMware Cloud Community
esxi1979
Expert
Expert
Jump to solution

get vm info from 10 odd Hosts running free esxi

Hello

I have 10 odd hosts which are running free esxi

They all have same root passwd...

can someone suggest a script which can pull the vm info from them ?

If they are in single vcenter its easy but in my case its little diff here

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Make sure you are in multiple mode (Set-PowerCLIConfiguration), then connect (Connect-VIServer) to each of the ESXi nodes.

Any cmdlet, like Get-VM, you now use, provided you do not use the Server parameter, will run against all connected ESXi nodes.

You can check the connected ESXi nodes by displaying the content of $global:defaultviservers


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

View solution in original post

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

Make sure you are in multiple mode (Set-PowerCLIConfiguration), then connect (Connect-VIServer) to each of the ESXi nodes.

Any cmdlet, like Get-VM, you now use, provided you do not use the Server parameter, will run against all connected ESXi nodes.

You can check the connected ESXi nodes by displaying the content of $global:defaultviservers


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

Reply
0 Kudos