Originally published April 17, 2017 @ 11:14 am
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
Experienced Unix/Linux System Administrator with 20-year background in Systems Analysis, Problem Resolution and Engineering Application Support in a large distributed Unix and Windows server environment. Strong problem determination skills. Good knowledge of networking, remote diagnostic techniques, firewalls and network security. Extensive experience with engineering application and database servers, high-availability systems, high-performance computing clusters, and process automation.