3 thoughts on “Checking VMware NTP configuration with Powershell”

  1. I recently needed to check settings as well as determine if the NTPD service was running.

    Get-VMHost | Select-Object Name,@{Name=”NTPServer”;Expression={$_ | Get-VMHostNtpServer}}, @{Name=”NTPRunning”;Expression={($_ | Get-VMHostService | Where-Object {$_.key -eq “ntpd”}).Running}} | Sort-Object -Property “NTPRunning”, “NTPServer”

    I used this to generate a report and added some extra script to fix incorrect settings (also works to change NTP server setting) as well as restart NTPD service if it has stopped.

    I have the full script available at:
    http://day2dayadmin.blogspot.com/2009/10/ntp-powershell-its-about-time.html

    and on the PowerCLI VMware community.

Leave a Reply