Group Policy Set SNMP Trap

Joseph Patrick 641 Reputation points
2020-08-20T14:51:27.767+00:00

We are updating the SNMP community string, we also have to set traps as well. We can set the community string with out an issue (path below) what our question is how do we add the traps? Can we use the "Specify Traps for Public Community" GPO settings to set traps? If so how do I set it?

What does the "Specify Permitted Managers" set?

computer config\policies\admin templates\network\snmp

Specify communities

"Specify Traps for Public Community"

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

Accepted answer
  1. Stephanie Yu 401 Reputation points
    2020-08-21T06:26:33.563+00:00

    Hello josephpatrick-7433,

    Thank you for posting here.

    Here are the answer for your references.

    According to the description above, I did the following tests in my lab.

    Here are the steps:

    1.On the Domain Controller, in Group Policy Management Editor
    Computer configuration\Policies\Admin Templates\Network\SNMP
    I typed Value: server1 for Specify communities, and Apply it.
    19343-6.png

    1. I entered Value: 192.168.1.1 for Specify traps for public community (this is an IP address that I write at will), and Apply it.

    Note: “Specify traps for public community” This setting has no effect if the SNMP agent is not installed on the client computer.
    19421-7.png

    1. On one domain joined client, run gpupdate /force in CMD,
      Run gpresult /h <c:\file.html> after gpupdate success (for example: gpresult /h c:\SNMPTRAP.html)
      You can see that these two GPOs are successfully configured.
      19422-8.png

    4.On the same client, open Registry Editor
    HKLM\SOFTWARE\Policies\ SNMP\Parameters
    You can see the GPO we configured and the corresponding value as follows:
    19229-9.png

    19402-10.png

    You can change the value of Value (via GPO or Registry) according to your needs and check if it works as intended.

    Hope the information above is helpful. If anything is unclear, please feel free to let us know.

    Best Regards,
    Stephanie Yu

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Joseph Patrick 641 Reputation points
    2020-08-20T20:45:46.97+00:00

    During testing of the GPO settings it did not work as intended, I plan on using regkey creation to accomplish the goal. Below is a example... Will this work?

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities]
    "Server1"=dword:00000004
    "Server2"=dword:00000004

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\Server1]

    "1"="name1.domain.com"
    "2"="name2.domain.com"
    "3"="name3.domain.com"
    "4"="name4.domain.com"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.