This cmdlet is part of the Vexasoft Cmdlet Library. You can download it now or click here to find out more.

Set-SNMPManager

Synopsis

Configures the SNMP managers and authentication trap settings on a local or remote computer.

Syntax

  • Set-SNMPSecurity [-Manager] [-EnableAuthenticationTraps] [DisabledAuthenticationTraps] [-ComputerName] [-Credential]

Description

The Set-SNMPManager cmdlet is used to specify the SNMP managers and enable or disable authentication traps on the local or a remote computer.

Parameters

  • Manager Add this SNMP manager. The SNMP service will only accept packets from managers. To accept packets from any manager, specify the name '*' or 'All'.
  • EnableAuthenticationTraps Enable sending authentication traps on the specified computer.
  • DisableAuthenticationTraps Disable sending authentication traps on the specified computer.
  • ComputerName The computer against which to run the cmdlet. By default this parameter will be populated with the name of the local computer.
  • Credential The credentials under which to run the cmdlet. By default this cmdlet will run as the current user. Using this parameter and the Get-PSCredential cmdlet you can specify an alternate set of credentials under which to execute this command.

Inputs

Set-SNMPManager accepts the output of the Get-SNMPManager cmdlet as an input object. In addition, the Manager and ComputerName parameters each accept pipeline input by property name.

Outputs

Set-SNMPManager makes changes directly to Windows and does not output any Powershell objects.

Notes

The Set-SNMPManager cmdlet requires that the RPC service is started on the computer it is trying to access and that DNS services are available to resolve target host names.

Example 1

In this command the SNMP service of the local computer is configured to accept Manager 192.168.0.44 and to use authentication traps:

Set-SNMPManager -Manager 192.168.0.44 -EnableAuthenticationTraps

Example 2

In this command the SNMP service of the remote computer Serv01 is configured not to use authentication traps:

Set-SNMPManager -DisableAuthenticationTraps -Computer Serv01

Example 3

The Set-SNMPManager cmdlet can be used in conjunction with the Get-SNMPManager cmdlet. In this command the SNMP service of the remote computer Serv02 is configured to use the same managers as computer 'Serv01':

Get-SNMPManager -Computer Serv01 | Set-SNMPManager -Computer Serv02