Hi,
i think the title is preaty clear. We have a vcenter versin 6.7 with multiple host on esxi server 6.7.0.
i would like to plan a task to restart a service like ntp on all esx in this vcenter,
i have this script, is it ggod for you ?
Connect-viserver vcenter1 -user vcenter -pass password
foreach($esx in Get-VMHost){
Restart-VMHostService -HostService ( $_ | Get-VMHostService | Where { $_.Key -eq "ntpd" } )
}