Get

Get is used to retrieve the corresponding string to the specified OID.

Syntax

Get (oid)

Returns

String.

Example

Very Simple SNMPSimple Network Management Protocol is a protocol for network management. It is used to collect information from network devices, such as servers, printers, hubs, switches, and routers. Client that retrieves the SysName from a computer which has an SNMP server installed:

Function Main

Dim snmp1 As Object

'Carriage return and line feed

cr = Chr(13) + Chr(10)

Set snmp1 = SNMP.Connect("127.0.0.1", "public")

'OID of the sysName

Val1 = "1.3.6.1.2.1.1.5.0"

'OID of the systems Object

root = "1.3.6.1.2.1.1."

snmp1.Get Val1

echo "Oid: '"+Val1 + "'"+cr

echo "Value: '"+snmp1.Get(Val1)+"'"+cr

snmp1.Close

End Function