I have script to set ntp servers on my esxi hosts:
Get-VMHost | Add-VMHostNtpServer -NtpServer ntpserver1
#This set of commands is aprt of our standard build process.
#Configure NTP server
Add-VmHostNtpServer -NtpServer ntpservers1 -VMHost $VMHosts
#Allow NTP queries outbound through the firewall
Get-VMHostFirewallException -VMHost $VMHosts | where {$_.Name -eq "NTP client"} | Set-VMHostFirewallException -Enabled:$true
#Start NTP client service and set to automatic
Get-VmHostService -VMHost $VMHosts | Where-Object {$_.key -eq "ntpd"} | Start-VMHostService
Get-VmHostService -VMHost $VMHosts | Where-Object {$_.key -eq "ntpd"} | Set-VMHostService -policy "automatic"
But how do I use powercli to set the startup policy to start with host ?
On the Policy parameter you can use 3 values.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
On the Policy parameter you can use 3 values.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference