I am playing around with the Orion SDK and i am trying to discover interfaces on a node. We are running SolarWinds SAM.
I am testing this script:
Import-Module SwisPowerShell
$swis = Connect-Swis -Hostname solarwinds -Trusted
# The node ID to discovery interfaces on
$nodeId = 3
# Discover interfaces on the node
$discovered = Invoke-SwisVerb $swis Orion.NPM.Interfaces DiscoverInterfacesOnNode $nodeId
if ($discovered.Result -ne "Succeed") {
Write-Host "Interface discovery failed."
}
else {
# Uncomment one of the following to limit the interfaces that get added:
# No. 1: Remove interfaces that are NOT ifType 6 (FastEthernet)
#$discovered.DiscoveredInterfaces.DiscoveredLiteInterface | ?{ $_.ifType -ne 6 } | %{ $discovered.DiscoveredInterfaces.RemoveChild($_) | Out-Null }
# No. 2: Remove interfaces that have a caption of 'lo' (Loopback)
#$discovered.DiscoveredInterfaces.DiscoveredLiteInterface | ?{ $_.Caption.InnerText -eq 'lo' } | %{ $discovered.DiscoveredInterfaces.RemoveChild($_) | Out-Null }
# Add the remaining interfaces
#Invoke-SwisVerb $swis Orion.NPM.Interfaces AddInterfacesOnNode @($nodeId, $discovered.DiscoveredInterfaces, "AddDefaultPollers") | Out-Null
$discovered
}
When running this script i get the error Invoke-SwisVerb : Verb Orion.NPM.Interfaces.DiscoverInterfacesOnNode: Cannot find assembly. Anyone knows why i get this? Is this command only for the NPM part of Solarwinds?