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.
Pre-Requsites
Link to Script
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.
1# UCS PowerTool Script that to set Syslog 2# @davidstamen 3# http://davidstamen.com 4 5#Define Variables 6$cred = Get-Credential 7$domains = "ucs01.lab.local","ucs02.lab.local" 8$SyslogServer = "syslog.lab.local" 9$Name = "primary"10$Facility = "local7"11$AdminState = "enabled"12$Severity = "notifications"1314#Cycles through each UCS setting values15Foreach ($ucs in $domains) {16 Connect-UCS $ucs -Credential $cred17 Get-UcsSyslogClient -Name $Name | Set-UcsSyslogClient -AdminState $AdminState -ForwardingFacility $Facility -Hostname $SyslogServer -Severity $Severity -Force18 Disconnect-UCS19}Execute the Script
- Run .\Set-UcsSyslog.ps1
