This is a simple learning script which shows several steps in logically thinking about scripting and how to interface with the Orion API.
When executed, this script will get all nodes registered via WMI, SNMP, or Agent. For each of them it will strip off the domain name and capitalize everything that's left and then update the Orion node to use that caption name.
- Lines 8 - 10: Builds your connection to the SolarWinds Information Service
- Lines 13 - 22: The query we are using to find node captions matching our simple domain name check.
- Line 25: Retrieves the list of nodes matching our query.
- Lines 28 - 34: Loops through each node to update, strips off everything after the first period (.), capitalizes it, sends a message back to the console. and sends the update request to the API.