Quantcast
Channel: VMware Communities : Unanswered Discussions - vCenter™ Server
Viewing all articles
Browse latest Browse all 3506

plan a task to restart a service like on all esx in vcenter

$
0
0

Hi,

 

i think th title is preaty clear. We have a vcenter versin 6.7 with 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 thnik yhere is 2 solutions :

 

- a script which connects to each esx and which launches a service restart command like

 

Connect-viserver vcenter1 -user root -pass password $report = foreach($esx in Get-VMHost){    Restart-VMHostService -HostService ( $_ | Get-VMHostService | Where { $_.Key -eq "ntpd" } ) }

 

 

- or a planified task in vcenter but the option is not active i think because a can edit run a task but not add a task.

 

So

what is your opinion and the possibilities ?

 

Thank you

 


Viewing all articles
Browse latest Browse all 3506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>