I am working on automating mutes on servers using Orion SDK Powershell module. I am getting username or password errors whenever I use the -Credential or -Username/Password parameters but no issues with -Trusted under my own context. -Trusted is not desired as this task will be ran by a service account. I know the creds I am providing work fine because I can successfully connect via GUI. Any ideas?
$swis = Connect-Swis -UserName user -Password pass -Hostname orion.contoso.com
$nodeUri = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE SysName LIKE'myserver'"
Get-SwisData : Invalid username or password.
At line:1 char:12
+ $nodeUri = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE SysN ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-SwisData], MessageSecurityException
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.GetSwisData