我要检查Vcenter上的NTP设置是否设置为“正在运行” 我正在使用以下cmdlet,但它会返回NTP服务器的IP地址。
Get-VMHostNtpServer -VMHost abc.com
如何将状态检查设置为“正在运行”?
答案 0 :(得分:1)
Get-VMHostService
cmdlet返回HostService
实例,其中包含Running
属性。
older Get-VMHostService
documentation中的此示例显示了使用ntpd
属性返回的服务(包括Running
)的列表:
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