3 Replies Latest reply on Jun 12, 2017 11:57 AM by mulder85gr

    Create Discovery does not add WMI nodes despite credentials order

    mulder85gr

      Hello,

       

      Not sure if anyone has touched on this already, or if I am doing some silly mistake, but here is my issue:

       

      I am creating a discovery via Powershell with a mix of WMI and SNMP nodes.

       

      When I put the SNMP credentials highest in the order, the nodes get added via SMNP.

      When I put the WMI credentials highest in the order, the nodes still get added via SNMP

      When I remove completely the SNMP credentials and leave only the WMi credentials, the nodes only then do get added via WMI.

       

      So my question is, why is this happening? How can I tell the discovery to first try the WMI credentials and only if those fail, try the SNMP? It seems that setting the credentials order with WMI on top, does not do that.

       

      Any help appreciated. Thanks,

      Alex

        • Re: Create Discovery does not add WMI nodes despite credentials order
          mulder85gr

          Upon further research, I found an existing undocumented property in the constructed xml: <PreferredPollingMethod> This property is not documented in the Github Discovery page. Could anyone help me change that property from the default SNMP to WMI? I tried explicitly specifying it in the script but it didn't work.

            • Re: Create Discovery does not add WMI nodes despite credentials order
              tdanner

              PreferredPollingMethod has two possible values: SNMP and WMI. It does exist on the CoreDiscoveryPluginConfiguration object, but the CreateCorePluginConfiguration verb does not give you a way to control it - you always get the default "SNMP". However, it's just XML and if you don't mind some ugly syntax, you can change the value in the CoreDiscoveryPluginConfiguration  XML before constructing the StartDiscoveryContext and calling StartDiscovery. Like this:

               

              $CorePluginConfigurationContext = ([xml]"

                   ... your xml goes here ...

              ").DocumentElement

               

              $CorePluginConfiguration = Invoke-SwisVerb $swis Orion.Discovery CreateCorePluginConfiguration @($CorePluginConfigurationContext)

               

              $CorePluginXml = [xml]$CorePluginConfiguration.InnerText

              $CorePluginXml.PluginItems.pluginItem.ArrayOfDiscoveryPluginConfigurationBase.DiscoveryPluginConfigurationBase.PreferredPollingMethod = "WMI"

              $CorePluginTemp = [xml]"<x />"

              $CorePluginTemp.DocumentElement.InnerText = $CorePluginXml.OuterXml

              $CorePluginConfiguration = $CorePluginTemp.DocumentElement

               

              $StartDiscoveryContext = ([xml]"

                 ... your xml goes here ...

              ").DocumentElement

               

              $DiscoveryProfileID = (Invoke-SwisVerb $swis Orion.Discovery StartDiscovery @($StartDiscoveryContext)).InnerText

              1 of 1 people found this helpful