1 Reply Latest reply on Apr 1, 2013 8:17 PM by richardteachout

    Adding a node to APM/SAM using powershell with WMI credentials

    richardteachout

      I have figured out how to add a node to APM/SAM using powershell, but it only works with ICMP (or snmp) as the ObjectSubType, not with WMI (well, it adds it, but web interface errors after doing so and I can't even go back and update the credentials)

      I can add it as ICMP, and then change to WMI, but I would prefer to do this programmatically.

       

      I assume I subsequently have to add a set of WMI credentials (in my example, I need to correlate credential '6' to that node) after the initial node creation, but can't figure out how.

       

      Can anyone shed some light on what else I need to do to automatically provision a node using WMI and a set of credentials (which might already exist at which point I can search the credential ID, or might not, and have to add them as well)?

      (v5.5)

       

      Thanks!

        • Re: Adding a node to APM/SAM using powershell with WMI credentials
          richardteachout

          I think I did manage to figure it out myself

           

          I had to add the WMICredential to the NodeSettings, which forced the correlation to work as expected.


          >> Added a node, then queried the node ID, then added this

          $newNodeProps = @{

            NodeID="$nodeId";

            SettingName="WMICredential";

            SettingValue="4";

            }

            $newUri2 = New-SwisObject $swis -EntityType "Orion.NodeSettings" -Properties $newNodeProps

           

          Now it edits, and properly uses the right credentials, so I can properly API setup a WMI node.