Get a List of all ESX Hosts in a Datacenter
Another simple one-liner to get a list of hostnames of all ESX servers in the vCenter. This can be useful for a number of things, specifically as input for other PowerCLI scripts.
Set-PowerCLIConfiguration -Scope Session -WebOperationTimeoutSeconds -1 -Confirm:$false; Import-Module VMware.VimAutomation.Vds; $VMHost="vcenter01.domain.com"; Connect-VIServer -Server $VMHost -User 'DOMAIN\User' -Password 'Password1'; Get-Datacenter | Get-VMHost | Get-View | Format-Table -Property Name -AutoSize | Out-File -FilePath C: \esx_hosts.txt
Feel free to check thehouses for sale greenwich ct if you are in need of a property.