To compensate for the bug in NCM 2024.2 - Unable to import nodes from a discovery, I try to use orionsdk.
I have found the verb Orion.Discovery.ImportDiscoveryResults
I have found hot to get the profileID
Get-SwisData -SwisConnection $SwisConnection -query "SELECT ProfileID, Name, Description, RunTimeInSeconds, LastRun, EngineID, Status, JobID, SIPPort, HopCount, SearchTimeout, SNMPTimeout, SNMPRetries, RepeatInterval, Active, DuplicateNodes, ImportUpInterface, ImportDownInterface, ImportShutdownInterface, SelectionMethod, JobTimeout, ScheduleRunAtTime, ScheduleRunFrequency, StatusDescription, IsHidden, IsAutoImport, CronSchedule, SnmpPort, ChangedNodesCount, NotImportedNodesCount, Frequency
FROM Orion.DiscoveryProfiles
WHERE NAME LIKE 'One shot to add by IPS'"
# Build Connection to SWIS - SolarWinds Platform
$SwisHost = ""
$SwisConnection = Connect-Swis -Hostname $SwisHost -Certificate
$DiscoveryID = Get-SwisData -SwisConnection $SwisConnection -query "SELECT ProfileID, Name, Description, RunTimeInSeconds, LastRun, EngineID, Status, JobID, SIPPort, HopCount, SearchTimeout, SNMPTimeout, SNMPRetries, RepeatInterval, Active, DuplicateNodes, ImportUpInterface, ImportDownInterface, ImportShutdownInterface, SelectionMethod, JobTimeout, ScheduleRunAtTime, ScheduleRunFrequency, StatusDescription, IsHidden, IsAutoImport, CronSchedule, SnmpPort, ChangedNodesCount, NotImportedNodesCount, Frequency
FROM Orion.DiscoveryProfiles
WHERE NAME LIKE 'One shot to add by IPS'"
$xmlFile = [xml]'
false
$DiscoveryID.ProfileID
'
Invoke-SwisVerb -SwisConnection $SwisConnection -EntityName Orion.Discovery -Verb ImportDiscoveryResults -arguments @($xmlFile)
But how do you pass the xml and the variable inside <ProfileID>$DiscoveryID.ProfileID</ProfileID>?
Thanks