esxcli system syslog reload
While there is nothing wrong with restarting the daemon this way, its quite annoying if you need to do this to a large number of ESXi Hosts. A much easier and fun way is to do it via PowerCLI using the Datacenter or Cluster variable.
Enjoy!
foreach ($esxhost in (Get-Datacenter -Name $Datacenter | Get-VMHost )){
Write-Host "ESX: $esxhost"
$esxcli = Get-EsxCli -VMhost $esxhost
$esxcli.system.syslog.reload()
}
or
foreach ($esxhost in (Get-Cluster -Name $cluster | Get-VMHost )){
Write-Host "ESX: $esxhost"
$esxcli = Get-EsxCli -VMhost $esxhost
$esxcli.system.syslog.reload()
}
No comments:
Post a Comment