FineSNMPSet is a command-line tool for windows that allows you to send arbitrary values using the SNMP "Set request" to writable MIB fields in SNMP enabled devices. FineSNMPSet can be used from the command-line and of course in cmd scripts.
FineSNMPSet supports SNMPv1, SNMPv2 and SNMPv3 (including SNMPv3 Authentication with MD5 or SHA and Encryption with DES, AES or 3DES) and runs on all Windows versions (32 and 64 bit) from Windows XP onwards.
Without a license key, FineSNMPSet only supports the mib-2 OIDs (all OIDs under 1.3.6.1.2.1). The licensed/commercial version does not have any limitation!. However, you cannot buy a separate license key for FineSNMPSet. FineSNMPSet can be unlocked by buying a license key for any other FineConnection SNMP component or the Components bundle.
Syntax
finesnmpset -host <IP address> [-community <str>] [-snmpport <1..65534>] [-snmpversion <1|2|3>] [-username <str> [-authpw <str>] [-authprot <MD5|SHA>] [-encpw <str>] [-encalg <DES|AES|3DES>]] -oid <str> [-instance <str>] -oidtype <oidtype> -oidvalue <str> [-quiet]
<oidtype>
- Integer
- OctetString
- Null
- ObjectID
- IPAddress
- Counter32
- Gauge32
- TimeTicks
- Opaque
- NSAP
- Counter64
- UnsignedInteger32
Defaults
- -community="private"
- -snmpport=161
- -snmpversion=2
- -authprot=MD5
- -encalg=DES
- -quiet=false (if -quiet is specified then use exitcode => for using FineSNMPSet in cmd scripts!)
Commandline examples
The following examples show working examples of the FineSNMPSet command that sets the sysContact variable to "The Network Manager". In the first example I use SNMP version 1.
FineSNMPSet.exe -host 192.168.3.253 -snmpversion 1 -community private -oid 1.3.6.1.2.1.1.4 -instance .0 -oidtype string -oidvalue "The network manager"
The <-instance> tag is optional so I can also specify the instance in the OID so that the command now reads:
FineSNMPSet.exe -host 192.168.3.253 -snmpversion 1 -community private -oid 1.3.6.1.2.1.1.4.0 -oidtype string -oidvalue "The network manager"
The following example does exactly the same but uses SNMPv3 with authentication and encryption.
FineSNMPSet.exe -host 192.168.3.253 -snmpversion 3 -username user3 -authpw user3password -authprot MD5 -encpw user3encryption -encalg DES -oid 1.3.6.1.2.1.1.4 -instance .0 -oidtype string -oidvalue "The network manager"
Using FineSNMPSet in a commandline script
The following example shows FineSNMPSet in action when used in a commandline script. By using the -quiet tag, FineSNMPSet returns an exitcode indicating succes or failure of its operation. Exitcode 0 = success, exitcode 1 = failure. Without the -quiet tag, FineSNMPSet returns a messagestring which cannot be used in script logic.
echo off FineSNMPSet.exe -host 192.168.3.253 -snmpversion 1 -community private -oid 1.3.6.1.2.1.1.4 -instance .0 -oidtype string -oidvalue 1234567890 -quiet rem rem IF ERRORLEVEL 1 goto Label1 IF ERRORLEVEL 0 goto Label0 :Label1 echo FineSNMPSet ended in an error goto End :Label0 echo FineSNMPSet ended OK goto End :End
Enjoy FineSNMPSet
Paul van Bergen
Download FineSNMPSet.exe