I have been working on integrating SolarWinds alerts/acknowledgements with IBM's Tivoli Netcool. I currently have a database trigger running on a scheduled interval to acknowledge SolarWinds alerts using the SWIS API. The current implementation of connect-swis looks like this:
#Decrypt the password file and store it in a variable to be passed to SWIS (only the user that encrypted the password file can decrypt it) $username = "admin" $securePassword = get-content C:\cred.txt | ConvertTo-SecureString $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($securePassword) $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) #Connect to SWIS $swis = Connect-Swis -host $SWServer -UserName $username -Password $password
In order to create the cred.txt file, which contains the password for the user "admin", I ran the following Windows command prior to running the script:
read-host -assecurestring | convertfrom-securestring | out-file C:\cred.txt
This is obviously not the most glamorous way to do this. I understand that there are other arguments that I can use to authenticate with SWIS. Could anyone fill me in on what those are, and how they work? For example, I have heard that you can do AD authentication or just a certificate.