Modify Syslog servers on ESXi hosts: Difference between revisions

From VVCWiki
Jump to navigationJump to search
(Created page with "<source lang="powershell"> $hosts = get-vmhost foreach ($server in $hosts) { write-host $server Set-VMHostSysLogServer -vmhost $server -syslogserver 'tcp://syslog-server:1...")
 
No edit summary
 
Line 5: Line 5:
   write-host $server
   write-host $server
   Set-VMHostSysLogServer -vmhost $server -syslogserver 'tcp://syslog-server:1514'
   Set-VMHostSysLogServer -vmhost $server -syslogserver 'tcp://syslog-server:1514'
  $Reload = (Get-ESXCLI -vmhost $server).System.Syslog.reload()
}
}
</source>
</source>

Latest revision as of 02:32, 5 March 2014

$hosts = get-vmhost
foreach ($server in $hosts)
{
  write-host $server
  Set-VMHostSysLogServer -vmhost $server -syslogserver 'tcp://syslog-server:1514'
  $Reload = (Get-ESXCLI -vmhost $server).System.Syslog.reload()
}