The wrapper is pretty simple since my objective is to do a quick check of SNMP connectivity. The version and the OID polled are hard coded to v2c and sysObjectID.
This could be used to discovery which community strings work on a system by using for loops in the command line. For example, if you wanted to test a bunch of community strings:
for %A in (public string1 string2 string3 string4 etc) do @snmpdiscover hostname %A
This will output something like this:
Host:localhost Community:public 1.3.6.1.4.1.311.1.1.3.1.1 Host:localhost Community:string1 %Failed to get value of SNMP variable. Timeout. Host:localhost Community:string2 %Failed to get value of SNMP variable. Timeout. Host:localhost Community:string3 %Failed to get value of SNMP variable. Timeout. Host:localhost Community:string4 %Failed to get value of SNMP variable. Timeout. Host:localhost Community:etc %Failed to get value of SNMP variable. Timeout.In this case, the first community string (public) worked, while the others didn't.