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.

Add WMI volumes with Powershell

Hi,

I am very new to SolaWinds automation and i am having difficulty adding volumes / disks to my node with PowerShell. I have utilized the sample script CRUD.AddWMINodes to add a node into SolaWinds however i noticed it does not add the volumes. Can someone share a complete script for adding disks into my node? i have found some scripts on this forum however they seem to be partial scripts covering the OP's issue and i am struggling to piece it all together.

Thanks!

  • I recommend you switch to using the Discovery API. It is more complicated, but you will have an easier time getting child objects like interfaces and volumes monitored correctly. Here's a PowerShell sample: OrionSDK/DiscoverSnmpV3Node.ps1 at master · solarwinds/OrionSDK · GitHub

    That sample is for SNMPv3 monitoring, but really all you need to change for WMI monitoring is to give it the ID of a Windows credential instead of an SNMPv3 credential.

  • Thanks for the recomendation, i have now tried this. While i already had the server added to Solawinds the script gave me this message:

    Discovery profile #32 running..............Finished

    Import Finished

    0 items imported.

    I then deleted the server from solawinds and attempted to readd it using this method. It readded the server into solawinds however it added it with SNMP monitoring and still did not discover any drives. It did however pick up an old DNS entry which i thought was strange.

    I then attempted this on another server (one that has never been added into SolaWinds) and it worked a charm, maybe to well since it added some scheduled task monitoring in there. I think that solawinds has an old DB record for the first server i tried adding and running the discovery is picking up that record and readding it? i could be completly off the mark though. Thank you for your help! emoticons_happy.png

  • I'm not sure where the old DNS entry is coming from. Maybe your reverse DNS records (PTR) are stale for some reason?

    Discovery should only be using credentials that are listed in the discovery profile. If there are no SNMP credentials in the discovery profile, then it shouldn't be doing SNMP at all. Are there any credential IDs for SNMP creds in the profile you are running?

  • does anyone know which parts to change on this script that would allow it to work with WMI?