This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Get-SwisData Credentials failing when local

We are trying to run a powershell script that updates some data nightly and I'd like to run it on the Orion server itself. The issue is, the credentials I'm running the script as work fine when not on the local machine but fail when running locally. I've tried the FQDN, localhost, IP, nothing works. same error:

Get-SwisData : The server has rejected the client credentials.
CategoryInfo          : NotSpecified: (:) [Get-SwisData], SecurityNegotiationException
FullyQualifiedErrorId : System.ServiceModel.Security.SecurityNegotiationException,SwisPowerShell.GetSwisData

Connection: 
$swis = Connect-Swis -Trusted -Hostname localhost 

Anything special need to be done to connect from the Orion server itself?

Thank you,

Dustin

Parents
  • You can always try...

    $Swis = Connect-Swis -Hostname $env:COMPUTERNAME -Certificate

    ...if it's running directly on an Orion Server itself.

    The -Trusted parameter tells it to run through with Windows Integrated Authentication (attempt to log into Orion as the currently logged in user).  The -Certificate parameter says to use the local certificate store for authorization.

    $env:COMPUTERNAME is just a cute way to get the local computer's name, but localhost (or 127.0.0.1) should work.  My guess is that it's your authentication and not your connection that's causing the problem.

  • I'm afraid I get the same results. It might be something to do with how the binding works when connecting locally. It reminds me of an issue I had on a site (not SolarWinds related) before and I had to create a local binding when I wanted to connect to the web service locally since the external connections all hit the external binding. Could be totally off though. 

    I can say this, I know for sure the credentials are good since I can connect with the same script on another server logged in as the same user. I also created a local account and passed creds with Get-Credentials and get the same error when connecting from the Orion server itself...

  • Might be worth looking at $Swis.ChannelFactory.Endpoint.Address.Uri.AbsolutePath,  $Swis.ChannelFactory.Endpoint.Address.Uri.Host, and $Swis.ChannelFactory.Endpoint.Address.Uri.Port to see they are different between the machines.

    Depending on how strict your IIS settings are you may need to use the FQDN for the hostname, even from the Orion server itself.

Reply
  • Might be worth looking at $Swis.ChannelFactory.Endpoint.Address.Uri.AbsolutePath,  $Swis.ChannelFactory.Endpoint.Address.Uri.Host, and $Swis.ChannelFactory.Endpoint.Address.Uri.Port to see they are different between the machines.

    Depending on how strict your IIS settings are you may need to use the FQDN for the hostname, even from the Orion server itself.

Children