OID Output Object (Set-SNMP Cmdlet)

Returned from the SNMP operation.


Object OID {
   string Host;
   string OID;
   string OIDValue;
   byte[] OIDValueB;
   string OIDType;
   int ErrorIndex;
   int ErrorStatus;
   string ErrorDescription;


For each OID in every response received by the cmdlet an OID object will be returned.

Host contains the host address that the response was returned from.

OID contains the OID name for the response. If the Translate switch is set, the cmdlet will attempt to resolve the textual syntax for the OID.

OIDValue contains the value for the OID.

OIDValueB contains the value for the OID expressed as a byte array.

OIDType contains the type of OID received.

Possible object type values include:

  • Integer
  • OctetString
  • Null
  • ObjectID
  • IPAddress
  • Counter32
  • Gauge32
  • TimeTicks
  • Opaque
  • NSAP
  • Counter64
  • UnsignedInteger32

The cmdlet also supports the following artificial object values used to designate error conditions:

NoSuchObjectNo such object error.
NoSuchInstanceNo such instance error.
EndOfMibViewEnd of MIB View error.

ErrorIndex contains the index of the variable which caused the error.

ErrorStatus contains the status code.

The following is a list of valid SNMP status code values:

0 (noError) No error.
1 (tooBig) The response cannot fit in a single SNMP message.
2 (noSuchName) Variable does not exist.
3 (badValue) Invalid value or syntax.
4 (readOnly) Variable is read-only.
5 (genError) Other error (SNMPv1).
6 (noAccess) Access denied.
7 (wrongType) Wrong object type.
8 (wrongLength) Wrong length.
9 (wrongEncoding) Wrong encoding.
10 (wrongValue) Wrong value.
11 (noCreation) No creation.
12 (inconsistentValue) Inconsistent value.
13 (resourceUnavailable) Resource unavailable.
14 (commitFailed) Commit failed.
15 (undoFailed) Undo failed.
16 (authorizationError) Authorization error.
17 (notWritable) Variable is not writable.
18 (inconsistentName) Inconsistent name.

The ErrorIndex parameter indicates the index of the first variable (object) that caused an error. The default value is 0.

Variable indexes start with 0. ErrorIndex has no meaning when ErrorStatus is 0 (no error).

ErrorDescription provides a textual description of the error.

Copyright (c) 2022 /n software inc. - All rights reserved.
NetCmdlets 2020 - Version 20.0 [Build 8165]

Copyright (c) 2022 /n software inc. - All rights reserved.
NetCmdlets 2020 - Version 20.0 [Build 8165]