Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 244528

Re: esxcli system syslog reload

$
0
0

Dave,

  You are in luck, i just did this myself.

 

From the VMA you can populate a file like hosts.txt with all the hostnames and run it against that.  Save this in a file like syslogreload.sh and set chmod u+x or copy and paste the text below /bin/bash once you have hosts.txt populated

 

 

#! /bin/bash

for host in $(cat hosts.txt)

do

echo starting $host

esxcli -s $host -u root --password 'pass' system syslog reload

echo $host done

done

 

 

In powercli you can do the same like this if connected to Vcenter already and you are comfortable.  You can also change to Get-Datacenter and pipe that.

 

$cluster = Read-Host "Enter Cluster Name"

 

foreach ($server in (Get-Cluster $cluster | Get-VMHost | where {$_.ConnectionState -eq "Maintenance"})){
     $esxcli = Get-EsxCli -VMHost $server
     $esxcli = Get-EsxCli
     $esxcli.system.syslog.reload()
}

Viewing all articles
Browse latest Browse all 244528

Trending Articles



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