solarwinds / OrionSDK

SDK for the SolarWinds Orion platform, including tools, documentation, and samples in PowerShell, C#, Go, Perl, and Java.
https://thwack.com/OrionSDK
Apache License 2.0
394 stars 139 forks source link

connect-swis throws method error on Powershell5, but not PS7 #330

Open EricMooreHays opened 1 year ago

EricMooreHays commented 1 year ago

using the command $Connection = Connect-Swis -Hostname ipam.emea.xxxx.loc -Username $UserName -Password $Password throws

Connect-Swis : Method not found: 'Void System.ServiceModel.NetTcpSecurity.set_Mode(System.ServiceModel.SecurityMode)'.
At line:1 char:15
Name                           Value                                                                                                                                                                                                                                                                        
----                           -----                                                                                                                                                                                                                                                                        
PSVersion                      5.1.19041.1682                                                                                                                                                                                                                                                               
PSEdition                      Desktop                                                                                                                                                                                                                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                                                                      
BuildVersion                   10.0.19041.1682                                                                                                                                                                                                                                                              
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                                                              
WSManStackVersion              3.0                                                                                                                                                                                                                                                                          
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                                                                          
SerializationVersion           1.1.0.1        

get-module
ModuleType Version    Name 
---------- -------    ----
Binary     3.1.0.343  SwisPowerShell 

on powershell 7 it's fine.

Name                           Value
----                           -----
PSVersion                      7.3.0
PSEdition                      Core
GitCommitId                    7.3.0
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Lng time since i last used it, so - sorry - no idea what I updated that broke it. Ask if you need more logs!