Get-SNMP Cmdlet
Parameters Output Objects Configuration Settings
The Get-SNMP cmdlet is used to query SNMP agents.
Syntax
Get-SNMP [parameters]
Remarks
The GET-SNMP cmdlet implements a standard SNMP Manager as specified in the SNMP RFCs. The cmdlet supports SNMP v1, v2c, and v3 through the Version parameter.
The cmdlet provides encoding/decoding, transport capabilities, and OID resolution, allowing for SNMP agents to be monitored directly from Powershell.
SNMP Get, GetNext, Walk and GetBulk are all supported.
SNMPv3 USM security is enabled by setting properties such as User and AuthenticationPassword. SNMPv3 encryption is enabled by setting EncryptionPassword.
Automatic translation from Node labels to OIDs is integrated in the cmdlet, allowing for a seamless integration with MIB files of different vendors.
The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.
# snmp broadcast for agent information
get
-snmp -agent 255.255.255.255 -oid 1.3.6.1.2.1.1.1.0 -translate
# perform a get-next request
get
-snmp 10.0.1.11 sysDescr.0 -next:$
true
# send a get-bulk request
get
-snmp -agent 10.0.1.11 -oid sysName.0, sysDescr.0 -bulk 5 -NonRepeaters 1
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
LogFile | The location of a file to which debug information is written. |
Agent | The address of the SNMP agent. |
AuthenticationPassword | The password to use for SNMPv3 authentication. |
AuthenticationProtocol | The authentication protocol used. |
Bulk | Indicates the number of maxRepetitions used to send a GetBulkRequest. |
Community | The community string used to authenticate SNMP packets. |
Config | Specifies one or more configuration settings. |
EncryptionAlgorithm | The encryption algorithm used for the request. |
EncryptionPassword | The password to use for SNMPv3 privacy encryption. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
Mib | Extra mib files to use for the Label to OID translation and vice versa. |
Next | Send a GetNext request for the OID . |
NonRepeaters | Count of variables not to be repeated. |
OID | The OID to use for this request. |
Port | The UDP port where the remote SNMP agent is listening. |
Timeout | The maximum time allowed for the operation. |
Translate | Resolve OIDs to labels in the response for the SNMP request. |
User | The username to use for authentication. |
Version | The version of SNMP to use for the request. |
Walk | Does an SNMP walk starting with the oid specified by OID . |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
OID | Returned from the SNMP operation. |
Configuration Settings
The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.
HexMACAddress | Determines if MAC addresses are automatically hex encoded. |
UseScalarInstance | Whether to automatically use the OID for scalar object instances. |
UseBackgroundThread | Whether threads created by the cmdlet are background threads. |
UseInternalSecurityAPI | Tells the cmdlet whether or not to use the system security libraries or an internal implementation. |