ESXi with PowerCLI ex: Syslog

You can download VMware PowerCLI below link.

https://my.vmware.com/web/vmware/details?productId=352&downloadGroup=PCLI550

Connect V Center

Connect-VIServer VCENTER

 

Syslog Change all vmhost

get-vmhost | Set-VMHostAdvancedConfiguration -NameValue @{'Config.HostAgent.log.level'='warning';'Vpx.Vpxa.config.log.level'='warning';'Syslog.global.logHost'='udp://172.16.253.20:514'}

PowerCLI like to Powershell base.

powercli

And you can use command like this.

foreach ($myHost in Get-VMHost)
{
    Write-Host "ESX: $myHost"

    $esxcli = Get-EsxCli -VMHost $myHost
    $esxcli.system.syslog.reload()
}

Good luck!

Facebook Comments

Leave A Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.