$Cluster = "XXX
$Hosts = Get-Cluster $Cluster Get-VMHost
ForEach ($Host in $Hosts)
{
Remove-VmHostNtpServer -NtpServer "
Add-VmHostNtpServer -NtpServer "
Get-VmHostService -VMHost $Host Where-Object {$_.key -eq "ntpd"} Restart-VMHostService -Confirm:$false Out-Null
write "NTP Server was changed on $Host"
}
No comments:
Post a Comment