Skip to content

Instantly share code, notes, and snippets.

@Dapacruz
Created December 7, 2017 00:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dapacruz/65794d494b500f7f46745a51fe508ad4 to your computer and use it in GitHub Desktop.
Save Dapacruz/65794d494b500f7f46745a51fe508ad4 to your computer and use it in GitHub Desktop.
Configure/Enable NTP on a VMware ESXi Host
$hosts = '*'
$ntp_servers = '10.10.1.10', '10.10.1.5'
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'}
Get-VMHostNtpServer -VMHost $hosts
Add-VMHostNtpServer -VMHost $hosts -NtpServer $ntp_servers
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'} | Start-VMHostService | Set-VMHostService -Policy 'automatic'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment