I am trying to connect to SolarWinds server from a different server and run a powershell script. My ultimate goal is mark an IP address as available. I can get the connection established, but as soon as I do a Get-SwisObject I get a security message.
Get-SwisObject : An error occurred when verifying security for the message.
If I put in a bogas password, I get the same message, so I guess I am not convinced that I am actually getting connected to my solarwinds server.
Here is my script:
If (!(Get-PSSnapin | where {$_.Name -eq "SwisSnapin"})) {
Add-PSSnapin "SwisSnapin"
}
$hostname = "solar.mycompany.com"
$username="admin"
$password="1234567"
$cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))
#Connect to the System
$target = Connect-Swis -v2 -Credential $cred -Hostname $hostname
#Get all URIs of Nodes in the System
$UriBasket = Get-SwisData $target "SELECT Uri FROM Orion.Nodes"
I searched high and low and I can not find what this error means (An error occurred when verifying security for the message.).
FYI, I am able to log on with the same account via a web browser, so I know the account has access.
Any help would be greatly appreciated.
Not sure I put this in the right group either.
Thanks, Jon