Introduction
Simple Network Management Protocol (SNMP) is widely used for monitoring servers, network devices, and infrastructure components. In Windows Server 2019, SNMP is available as a Windows feature and can be fully installed and configured using PowerShell, making it ideal for automation and audit-compliant deployments. We widely use it remotely monitor servers historical performance unclouding DUDE, LIBRENMS and other tools.
This article explains how to install SNMP, configure the community string, and allow access from any host using PowerShell only.
Prerequisites
Before proceeding, ensure:
-
You are logged in as a Local Administrator
-
PowerShell is running as Administrator
-
Windows Server version is 2019
Step 1: Install SNMP Service Using PowerShell
Run the following command to install the SNMP service along with management tools:
To verify installation:
The installation state should display as Installed.
Step 2: Configure SNMP Community String
SNMP community strings are stored in the Windows registry.
In this example, we configure a READ-ONLY community string named public.
Community Permission Values
-
4→ Read-Only -
8→ Read-Write -
1→ None
Step 3: Allow SNMP Access from Any Host
By default, Windows restricts SNMP access to specific managers. To allow SNMP queries from any host, remove existing restrictions. (for testing , but later ensure you enter your management / monitoring ip so that it should be restricted.)
Remove current permitted managers (if any):
Recreate an empty key:
An empty PermittedManagers key means SNMP access is allowed from all hosts.
Step 4: Restart SNMP Service
Apply changes by restarting the SNMP service:
Verify service status:
Step 5 (Optional): Configure Windows Firewall
If SNMP polling does not work, ensure UDP port 161 is allowed:
Testing SNMP Connectivity
From your monitoring or management server, test SNMP access:
A successful response confirms that SNMP is working correctly.
Security Considerations
Allowing SNMP access from any host is not recommended for production environments unless additional controls are in place. Consider:
-
Restricting SNMP access using firewall rules
-
Using strong, non-default community strings
-
Migrating to SNMPv3 where encryption and authentication are required
Conclusion
Using PowerShell to install and configure SNMP on Windows Server 2019 provides a fast, repeatable, and audit-friendly approach. This method is especially useful for system administrators managing large environments or following strict SOPs.
