we have around 4vcenter servers and it have many standalone servers.
i am able to get all the hosts lists and get finding its cluster, if its null i am updating it as "standalone", but this is not helping in speed and duplication of multiple actions.
Hence i am looking for powercli Script to collect Standalone ESXi hosts from vcenter server.
You should be able to get all standalone ESXi nodes with
Get-VMHost | where{$_.Parent.Name -eq 'host'}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You should be able to get all standalone ESXi nodes with
Get-VMHost | where{$_.Parent.Name -eq 'host'}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i am seeing only less number of servers and i can see that many esxihosts are placed under folders.
hence i have added "HostAndCluster" as well.
Get-VMHost | where{$_.Parent.Type -eq 'HostAndCluster'}
is that fine?
If you created Folders into which you moved your ESXi nodes, then yes, you would have to include the names of the folders as well.
But in that case, it is probably easier to just check the type of the Parent.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference