Below one liner will get Hostname, NTP server details and NTP service running status for all the Esxi Hosts in a vcenter. I tested this on vcenter running 5.5 version.
You need to run the below one liner in Powercli and the output will be exported into c:\scripts folder.
Get-VMHost |Sort Name|Select Name, @{N=”NTPServer”;E={$_ |Get-VMHostNtpServer}}, @{N=”ServiceRunning”;E={(Get-VmHostService -VMHost $_ |Where-Object {$_.key-eq “ntpd”}).Running}} | export-csv c:\Scripts\ntp.csv
Output will be like…
Name | NTPServer | ServiceRunning |
Esxi1.test.local | time.test.com | TRUE |
Esxi2.test.local | time.test.com | TRUE |
#1 by veze i poznanstva iskrica on September 17, 2020 - 6:38 am
cure za vezu slike