NOM
Get-SNMP
RÉSUMÉ
The Get-SNMP cmdlet is used to query SNMP agents for GET SNMP informat.
SYNTAXE
Get-SNMP [-Agent] <System.String> [-AuthenticationPassword [<System.Security.SecureString>]] [-Bulk [<System.Int32>
]] [-Community [<System.String>]] [-Config [<System.String[]>]] [-EncryptionPassword [<System.Security.SecureString
>]] [-LocalIP [<System.String>]] [-Mib [<System.String[]>]] [-Next [<System.Int32>]] [-NonRepeaters [<System.Int32>
]] [-OID] <System.String[]> [-Port [<System.Int32>]] [-Timeout [<System.Int32>]] [-Translate [<SwitchParameter>]] [
-User [<System.String>]] [-Version [<System.Int32>]] [-Walk [<SwitchParameter>]] [<CommonParameters>]
DESCRIPTION DÉTAILLÉE
The Get-SNMP cmdlet is used to query SNMP agents for GET SNMP informat. The GET-SNMP cmdlet implements a standard S
NMP 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 m
onitored 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 wit
h MIB files of different vendors.
In Netcmdlets V2, cmdlets support pipeline input for some of their parameters. Prebuilding a object and piping it
to the cmdlet is very useful but at the same time very dangerous, so this functionality should be used with caution
. Steps have been taken to decrease the risk of a possible mistake to occur with a prebuild object piped to the cm
dlet, for instance, the Credential parameter cannot be piped to the cmdlet, but it must be specified manually.
# snmp broadcast walk for agent information
get-snmp -agent 255.255.255.255 -oid 1.3.6.1.2.1.1 -walk -translate
# perform a series of get-next requests
get-snmp 10.0.1.11 sysDescr.0 -next 3
# send a get-bulk request
get-snmp -agent 10.0.1.11 -oid sysName.0, sysDescr.0 -bulk 5 -NonRepeaters 1
...
Partager