Using UCS PowerTool to Configure Syslog Servers

Published on March 14, 2016 under Cisco · Tagged Cisco UCS, Syslog and Powershell · Read in about 1 min (139 words)

Time for more UCS Scripting! This time to configure Syslog. The script is pretty straightforward, but nice to have to easily set up Syslog across multiple UCS domains.


Preparing to Execute the Script

The script is pretty straight forward, just need to define a few variables seen below and then you execute the script. I will walk you through the process.

# UCS PowerTool Script that to set Syslog
# @davidstamen

#Define Variables
$cred = Get-Credential
$domains = "ucs01.lab.local","ucs02.lab.local"
$SyslogServer = "syslog.lab.local"
$Name = "primary"
$Facility = "local7"
$AdminState = "enabled"
$Severity = "notifications"

#Cycles through each UCS setting values
Foreach ($ucs in $domains) {
  Connect-UCS $ucs -Credential $cred
  Get-UcsSyslogClient -Name $Name | Set-UcsSyslogClient -AdminState $AdminState -ForwardingFacility $Facility -Hostname $SyslogServer -Severity $Severity -Force

Execute the Script

  • Run .\Set-UcsSyslog.ps1
Share this post
comments powered by Disqus

See Also