Specify traps for public community
Spécifier les interruptions de la communauté publique
Explanation
This policy setting allows trap configuration for the Simple Network Management Protocol (SNMP) agent.
Simple Network Management Protocol is a protocol designed to give a user the capability to remotely manage a computer network by polling and setting terminal values and monitoring network events.
This policy setting allows you to configure the name of the hosts that receive trap messages for the community sent by the SNMP service. A trap message is an alert or significant event that allows the SNMP agent to notify management systems asynchronously.
If you enable this policy setting, the SNMP service sends trap messages to the hosts within the "public" community.
If you disable or do not configure this policy setting, the SNMP service takes the trap configuration configured on the local computer instead.
Note: This setting has no effect if the SNMP agent is not installed on the client computer.
Also, see the other two SNMP settings: "Specify permitted managers" and "Specify Community Name".
Ce paramètre de stratégie autorise la configuration des interruptions pour l’agent SNMP (Simple Network Management Protocol).
Le protocole SNMP est conçu pour permettre à un utilisateur de gérer à distance un réseau d’ordinateurs, en interrogeant et en définissant les valeurs de terminaux, et en analysant les événements réseau.
Ce paramètre de stratégie vous permet de configurer le nom des hôtes qui reçoivent des messages d’interception pour la communauté envoyés par le service SNMP. Un message d’interruption est une alerte ou un événement significatif qui autorise l’agent SNMP à avertir les systèmes de gestion de manière asynchrone.
Si vous activez ce paramètre de stratégie, le service SNMP envoie les messages d’interception aux hôtes de la communauté « Public ».
Si vous désactivez ou ne configurez pas ce paramètre, le service SNMP utilise à la place la configuration des interruptions définie sur l’ordinateur local.
Remarque : ce paramètre n’a aucun effet si l’agent SNMP n’est pas installé sur l’ordinateur client.
Consultez également les deux autres paramètres SNMP : « Spécifier les gestionnaires autorisés » et « Spécifier le nom de la communauté ».
Registry
HKEY_LOCAL_MACHINE\Software\Policies\SNMP\Parameters- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Snmp/SNMP_Traps_Public
$k = 'HKLM:\Software\Policies\SNMP\Parameters\TrapConfiguration\public'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Trap configuration
# Non-additive list: existing values of the key are cleared first
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<value1>', '<value2>') # Replace the values with your own
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }Disable
# Disable: Snmp/SNMP_Traps_Public
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Snmp/SNMP_Traps_Public
$k = 'HKLM:\Software\Policies\SNMP\Parameters\TrapConfiguration\public'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Trap configurationConfiguration des interruptionsSNMP_Traps_PublicListbox | List (table)list | Software\Policies\SNMP\Parameters\TrapConfiguration\publicValues named “” + number | REG_SZ (values under the key) |