Skip to content

Instantly share code, notes, and snippets.

@froop
Created February 5, 2022 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froop/581bfeec49ec0fa07984b13be37d6886 to your computer and use it in GitHub Desktop.
Save froop/581bfeec49ec0fa07984b13be37d6886 to your computer and use it in GitHub Desktop.
[Windows] Install SNMP Service
Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -IncludeManagementTools
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" -Name "public" -Value 4 -type DWord
Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers"
#Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers" -Name "1" -Value "localhost" -type String
#Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers" -Name "2" -Value "172.30.3.10" -type String
Restart-Service -Name SNMP
New-NetFirewallRule -DisplayName "SNMP Service" -Direction Inbound -Protocol UDP -LocalPort 161 -Action Allow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment