r/PowerShell•
afi420

Script for testing SNMP string

Im just looking for something that will tell me if snmp responds to a certain community string or not. Any ideas?

Posted Nov 20, 2018, 10:54 PM UTC

23
sk82jack•

It's all stored in the registry at Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters' -Recurse

The ValidCommunities key holds the community strings where the item property name is the community string and the item property value is the permission that community string should have (as per the values here.

The PermittedManagers key holds the SNMP server info and the item property name is incrementing numbers starting at 0 and the item property value is the name or IP address of the SNMP server.

That's all I've needed to work with in the past but hopefully that'll get you going in the right direction.

3
afi420OP•

Thanks that should be a good start

2
abuhd•

Snmpwalk ?

2