I want to check NTP Setting on Vcenter is set to "running" I am using the following cmdlet but it is returning back the IP addresses of the NTP servers.
Get-VMHostNtpServer -VMHost abc.com
How to check status is set to "running" or not?
The Get-VMHostService
cmdlet returns HostService
instances, which contain a Running
property.
This example from older Get-VMHostService
documentation shows a list of services (including ntpd
) returned with the Running
property:
C:\PS>Get-VMHostService -Refresh
Key Label Policy Running Required
--- ----- ------ ------- --------
ntpd NTP Daemon automatic False False
sshd SSH Server automatic True False
vmware-vpxa VMware VirtualCenter Agent automatic True False