Set-SNMP Cmdlet
Parameters Output Objects Configuration Settings
The Set-SNMP cmdlet exposes functionality to PowerShell to send SNMP SET requests.
Syntax
Set-SNMP [parameters]
Remarks
Managing SNMP agents directly from Powershell by changing OID values of remote agents is as easy as setting a few parameters.
Version allows the user to specify the version of SNMP to use, v1, v2 and v3 are supported. If v3 is selected, the User and AuthenticationPassword parameters can be set to authenticate to the agent before changing the OID value, and EncryptionPassword can be used to enable SNMPv3 encryption. The OID is specified by OID and the new value is specified by OIDValue.
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.
# Send a set-request
set
-snmp 10.0.1.173 sysDescr.0 -value
"New System Description"
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. |
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. |
OID | The OID to use for this request. |
OIDType | The type for the value of the OID. |
OIDValue | The value of the OID. |
Port | The UDP port where the remote SNMP agent is listening. |
Timeout | The maximum time allowed for the operation. |
User | The username to use for authentication. |
Version | The version of SNMP to use for the request. |
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.
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. |