Wednesday, October 9, 2013

Configure Syslog on ESXi using PowerShell and PowerCLI

Using Powershell, and PowerCLI you can configure all the ESXi Hosts attached to a vCenter instance

First, you need to configure the syslog host
get-vmhost| Set-VMHostAdvancedConfiguration -NameValue @{'Config.HostAgent.log.level'='info';'Vpx.Vpxa.config.log.level'='info';'Syslog.global.logHost'='udp://IPADDDR:514'}

Then you need to open the appropriate firewall ports for the traffic to get through
get-vmhost| Get-VMHostFirewallException |?{$_.Name -eq 'syslog'} | Set-VMHostFirewallException -Enabled:$true

 

No comments:

Post a Comment