I have a script that checks and if missing adds Custom pollers to nodes.
To add them it uses New-SwisObject $swis -EntityType 'Orion.NPM.CustomPollerAssignmentOnNode' -Properties $props
where props is
$props = @{
NodeID=$nodeid;
CustomPollerID=$customPollerId;
}
with $nodeid and $customPollerId being variables.
This has been working fine for a long time, but recently fails with the error below
New-SwisObject : Object reference not set to an instance of an object.
At C:\Update.ps1:330 char:16
+ ... $bbb = New-SwisObject $swis -EntityType 'Orion.NPM.CustomPollerA ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-SwisObject], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.NewSwisObject
I have recently upgraded Solarwinds to V2024.2.0 and wondered if its related to that?
I am running the following build of Powershell and have the latest SDK
Major Minor Build Revision
----- ----- ----- --------
5 1 22621 2506
Any ideas anyone please?
Thanks, Richard