Connect to vCenter server:
Connect-VIServer <hostname_of_your_VC>
Set up variable for all hosts:
$hosts = Get-VMHost
Set up syslog:
Set-VMHostSysLogServer -VMHost $hosts -SysLogServer 'syslog_ip_or_url:port'
Check if settings have been applied:
Get-VMHostSysLogServer -VMHost $hosts
If you need explanation or you do have any questions related to this script, please do not hesitate to leave the comment.
Visit my FB page: https://www.facebook.com/AngrySysOps
Subscribe to my YouTube channel: https://www.youtube.com/channel/UCRTcKGl0neismSRpDMK_M4A