#Sets a SysLog server on the Host virtual machine host
Set-VMHostSysLogServer -SysLogServer '<syslog ip>:133' -VMHost Host
#End
----------------------------------------------------------------------------------------------------------------------------
#######script for looping#######
#start of script
#replace IP with the vCenter IP
connect-viserver IP
Write-Host "b33 is connected to your server" -foregroundcolor Cyan -backgroundcolor DarkMagenta
#replace the <syslog server ip> with the correct sys log server ip
#default port is 514 but u may replace it with a custom port if desired.
Get-VMHost | Set-VMHostSysLogServer -SysLogServer <syslog server ip> -SysLogServerPort 514
Write-Host "b33 updated the syslog on all the hosts in return for a smile on your face" -foregroundcolor DarkYellow -backgroundcolor DarkBlue
#End of Script
----------------------------------------------------------------------------------------------------------------------------https://docs.google.com/document/d/1jTrin_2iHqE7QTwbnSLHiejAANMrvl4HaJ_sqYk7ciY/edit?usp=sharing
No comments:
Post a Comment