This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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

FormerMember
FormerMember

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!

  • FormerMember
    0 FormerMember

    I think I did manage to figure it out myself emoticons_happy.png

    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.