Using PureStorage Powershell to Configure SysLog Servers
Currently working on the final steps of getting our new equipment configured. The next step was to configure Syslog on all of our Pure Arrays. Another reason to script this task! Easily populate your arrays and server and at the click of a button you can configure all your arrays easily.
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#Import Module
2Import-Module PureStoragePowershellSDK
3
4#Define Variables
5$cred = Get-Credential
6$arrays = "pure.lab.local"
7$SysLogServers = "tcp://syslog.lab.local:514"
8
9#Cycles through each UCS setting values
10Foreach ($array in $arrays) {
11 Write-Host "Setting Syslog Information for $array"
12 $FlashArray = New-PfaArray -EndPoint $array -Credentials $cred -IgnoreCertificateError
13 Set-PfaSyslogServers -Array $FlashArray -SyslogServers $SyslogServers|fl
14}
Execute the Script
- Run .\Set-PureStorageSyslog.ps1