This change script allows you to quickly add a string to the SNMP Server Location property on all selected Cisco IOS devices.

  • How would I modify this script so that it removes the current location, as I want to change it rather than append it.

    I looked at the script and did see the "no" command, so assumed this would run before entering the new string...

    no snmp-server location

    snmp-server location @ContextNode.SysLocation @AppendString

    ...figured it out, just removed the if/else statement so its a simple cli remove and add.



  • I hope this is not too late for you but the answer is yes, absolutely. In fact the original version of this did exactly that. I modified it to something a bit simpler but I can upload a modified version if you would like.

    Basically you would need to import your existing spreadsheet in to a custom property matched on the IPs. The script would follow this logic:

    If SNMP Location is not empty, then change it to the existing string and append to the string the text from the custom property. If the SNMP Location field is empty it would be ignored.

    In essence the command would look like: snmp-server location Current_Location_Text Custom_Property_Text

    Depending on your needs it wouldn't be difficult to alter the script.


  • I would like to change my server location property to the circuit number of the connection and this is a different number for the 650 routers i have in the field, i do have this info in a spreadsheet that is associated to the IP address of each router.  what i am wondering is; is it possible to automate the data that is being written to each node based on the spreadsheet?