Many companies avoid exposing certain machines to the Internet to reduce security risks, requiring offline methods for product activation and operations. This is a common practice today.
Imagine a scenario where you are using offline installations of Windows 10 and Windows 11 and you want to monitor them using SNMP. Before monitoring, you need to install SNMP.
If you try to execute a standard PowerShell command for the SNMP installation, as shown in the screenshot below, you will encounter an error.
Installing SNMP on the offline machine is slightly different from Windows 10 and Windows 11 connected to the internet.
I will show you how to install SNMP on offline Windows 10 using the FOD (Features on Demand) package. The same procedure applies to Windows 11.
Step 1: Download the Features on Demand ISO file
Since Windows 10 doesn’t have internet access, you’ll need to download the SNMP feature manually. Microsoft provides the Features on Demand (FOD) ISO file, which includes the SNMP client.
To download the FOD, you must have access to either MSDN or VLSC. If you don’t have access to MSDN or VLSC, drop me a comment or email, and I will share it with you.
Download the ISO file on a machine with Internet access, then transfer it to the offline Windows 10 machine.
Once the file is downloaded, mount it on your Windows 10 machine by right-clicking on the file and selecting Mount.
Step 2: Install SNMP client
Login to the offline Windows 10 machine, open File Explorer and navigate to the drive.
- Run PowerShell as administrator.
- Enter the following PowerShell command to run the FOD component for SNMP:
Dism /online /add-package /packagepath:"D:\Microsoft-Windows-SNMP-Client-Package~31bf3856ad364e35~amd64~~.cab"
- Run the following command to install the SNMP client:
Dism /online /Add-Capability /CapabilityName:"SNMP.Client~~~~0.0.1.0"
Now, if you open the Services applet (services.msc), you will see that the SNMP Service is running, which wasn’t the case before.
Step 3: Configure SNMP
Since SNMP is installed, it’s time to configure it. If you close the Services applet (services.msc), open it again to continue.
- Navigate to SNMP Service, right click on it, and then click Properties.
- Click on the Security tab to configure the community string and ACL.
- Click on Add… under Community to create a community string. In my case, the community string is called prtg.
- Select Accept SNMP packets from these hosts and click Add… to add the IP of your NMS (Network Monitoring Solution). In my case, the IP is 192.168.88.245 which is my PRTG Core Server. This means the Windows machine will only accept SNMP communication coming and going to my NMS.
- Click Apply and OK and you are done.
That’s it! Enjoy monitoring!
…and feel free to share your comments.
SNMP (
Simple Network Management Protocol
) — это классический протокол для мониторинга и сбора информации о сетевых устройствах (сервера, сетевое оборудование, рабочие станции, принтеры и т.д.). Протокол SNMP довольно легкий, быстрый, для передачи данных использует UDP порты 161 и 162. В этой статье мы рассмотрим, как установить и настроить службу SNMP в Windows Server 2022/2019 и Windows 10/11.
Содержание:
- Установка службы SNMP в Windows Server 2022/2019
- Установка SNMP агента в Windows Server Core
- Установка службы SNMP в Windows 10/11
- Настройка службы SNMP в Windows Server и Windows 10/11
Установка службы SNMP в Windows Server 2022/2019
В Windows Server службу SNMP можно установить с помощью Server Manager.
Выберите Add roles and features -> Features. Выберите SNMP Service (если нужно отметьте также SNMP WMI Providers).
Служба SNMP WMI Provider позволяет опрашивать SNMP устройство через WMI.
Нажмите Next -> Install и дождитесь окончания установки.
Установка SNMP агента в Windows Server Core
В Windows Server Core можно установить SNMP с помощью веб-интерфеса Windows Admin Center и PowerShell.
Если вы используете Windows Admin Center, подключитесь к хосту Windows Server, выберите Roles and Features -> SNMP Service.
Т.к. в Windows Server Core отсутствует графический интерфейс, а для его управления используется командная строка, вы можете установить службу SNMP из командной строки PowerShell.
Для установки ролей в Windows Server из PowerShell используется командлет Install-WindowsFeature.
Проверьте, что служба SNMP не установлена:
Get-WindowsFeature SNMP*
Установите роль SNMP и WMI провайдер:
Install-WindowsFeature SNMP-Service,SNMP-WMI-Provider -IncludeManagementTools
Проверьте, что службы SNMP запущены:
Get-Service SNMP*
В нашем примере SNMP служба запущена, а SNMPTRAP остановлена.
Установка службы SNMP в Windows 10/11
Вы можете использовать службу SNMP не только в Windows Server, но и в десктопных редакциях Windows 10 и 11.
В Windows 10/11 служба SNMP, вынесена в отдельный компонент Feature On Demand (как RSAT и OpenSSH).
Вы можете установить SNMP через панель Settings. Перейдите в Apps -> Optional features -> Add an optional feature -> View features.
В списке доступных компонентов выберите Simple Network Management Protocol (SNMP) и WMI SNMP Provider. Для начала установки нажмите Next (понадобится интернет подключение к серверам Microsoft).
Для установки службы SNMP через PowerShell, используйте команду:
Add-WindowsCapability -Online -Name SNMP.Client~~~~0.0.1.0
Для установки службы SNMP без подключения к интернету, вам понадобится скачать ISO образ Windows 10/11 Features on Demand из личного кабинета на сайте лицензирования Volume Licensing Service Center (VLSC).
Для офлайн установки службы SNMP с такого ISO образа используется команда:
Add-WindowsCapability -Online -Name SNMP.Client~~~~0.0.1.0 -LimitAccess -Source \\msk-fs01\Distr\Windows-FOD\Win11\
Настройка службы SNMP в Windows Server и Windows 10/11
Вы можете настроить параметры службы SNMP в консоли services.msc. Найдите службу SNMP Services в списке и откройте ее свойства.
Обратите внимание, что у службы SNMP есть несколько дополнительных вкладок:
- Agent
- Traps
- Security
На вкладке Agent указывается базовая информация об устройстве (контакты администратора, местоположение). Здесь же можно указать тип информации, который может отправлять данное устройство при SNMP опросе.
В старых версиях протокола SNMP (SNMP v.1 и SNMP v.2) для авторизации пользователя используется строка сообщества (community string). На вкладке Security можно создать несколько строк подключения.
Можно выбрать один из пяти уровней доступа для сообщества:
- READ ONLY — позволяет получать данные с устройства;
- READ WRITE — позволяет получать данные и изменять конфигурацию устройства;
- NOTIFY — позволяет получать SNMP ловушки;
- READ CREATE – позволяет читать данные, изменять и создавать объекты;
- NONE
Вы можете создать несколько community string. Для этого нужно задать имя и выбрать права/ Для мониторинга состояние сервера достаточно выбрать READ ONLY.
В списке Accept SNMP packets from these hosts можно указать имена/IP адреса серверов, которым разрешено опрашивать данное устройство. Если вы не хотите ограничивать список разрешенных устройств, оставьте здесь Accept SNMP packets from any hosts.
На вкладке Traps указываются адрес серверов, на который SNMP агент должен отправлять SNMP-ловушка (SNMP trap). SNMP Trap это широковещательный USP пакет, используемый для асинхронного уведомления менеджера (например, сообщение о критическом событии).
Не забудьте открыть в Windows Defender Firewall правила, разрешающие входящий и исходящий трафик для SNMP запросов и ловушек (TRAP). Нужные правила фаейрвола можно включить с помощью PowerShell.
В Windows Firewall есть несколько готовых правил для SNMP трафика:
Get-NetFirewallrule -DisplayName *snmp* |ft
- SNMPTRAP-In-UDP
- SNMPTRAP-In-UDP-NoScope
- SNMP-Out-UDP
- SNMP-In-UDP-NoScope
- SNMP-Out-UDP-NoScope
- SNMP-In-UDP
Можно включить все правила, или только определенное:
Get-NetFirewallrule -DisplayName *snmp* | Enable-NetFirewallRule
Get-NetFirewallrule SNMP-Out-UDP | Disable-NetFirewallRule
В списке служб Windows есть еще одна служба SNMP Trap. Она используется для получения сообщений от других SNMP агентов и пересылки на SNMP сервера (обычно это система мониторинга, опрашивающая устройства по SNMP, например PRTG или Zabbix).
Если вы настраиваете SNMP на Windows Server Core, вы не сможете использовать графический интерфейс службы SNMP для настройки ее параметров. Вместо этого придется вносить изменения в реестр с помощью PowerShell. Настройки службы SNMP хранятся в ветке реестра HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters.
Следующие команды зададут описание агента:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent" -Name "sysContact" -Value "[email protected]" -PropertyType REG_SZ
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent" -Name "sysLocation" -Value "MSK_Datacenter1" -PropertyType REG_SZ
Для каждой ловушки SNMP придется создать отдельный ключ в HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\TrapConfiguration с именем community.
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\services\SNMP\Parameters\TrapConfiguration\public1"
Укажите разрешения для community:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" -Name "public1" -Value 4 -PropertyType DWord
Возможные значения:
- 1 — NONE
- 2 — NOTIFY
- 4 — READ ONLY
- 8 — READ WRITE
- 16 — READ CREATE
Для каждого community можно указать список серверов, с которых разрешено принимать запросы:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers" -Name "1" -Value "server1.winitpro.ru" -PropertyType REG_SZ
Перезапустите службу SNMP для применения новых настроек из реестра:
Get-Service SNMP|Restart Service
Если нужно распространить эти SNMP настройки на множество компьютеров/серверов Windows в домене, используйте возможности внесения изменений в реестр через GPO.
Проверить работу службы SNMP можно с помощью утилиты snmpwalk (доступна в любом Linux дистрибутиве):
# snmpwalk -v 2c -c public1 -O e 192.168.13.122
В этом примере мы опросили наш Windows хост через версию протокола SNMPv2.
Утилита вернула базовыую информацию о хосте (syscontact, sysname, syslocation) и довольно большое количество информации о состоянии сервера Windows.
Протокол Simple Network Management Protocol (SNMP) используется для мониторинга, оповещения о событиях и управления устройствами в сети. Протокол состоит из набора стандартов по управления сетью, в том числе протокол прикладного уровня (Application Layer protocol), схемы базы данных и набор объектов данных. SNMP может получать различную информацию (время аптайма, счетчики производительности, параметры устройств и т.д.) от любых сетевых устройств: коммутаторов, серверов, маршрутизаторов или простых компьютеров, на которых установлен агент SNMP.
В Windows 10 служба SNMP доступна в виде отдельного компонента Windows и по умолчанию не устанавливается. Рассмотрим, как установить и настроить SNMP в Windows 10.
- Установка службы SNMP в WIndows 10
- Настройка службы SNMP в Windows 10
Содержание:
Установка службы SNMP в WIndows 10
Вы можете проверить, установлена ли в вашей системе служба SNMP с помощью PowerShell командлета Get-Service:
Get-Service -Name snmp*
Вы можете установить службу SNMP через панель управления. Перейдите в Панель управления\Все элементы панели управления\Программы и компоненты\ Включение или отключение компонентов Windows).
В списке компонентов выберите Simple Network Management Protocol (SNMP)/протокол, и WMI SNMP Provider / Поставщик WMI для SNMP (обеспечивает доступ к информации SNMP через интерфейсы Windows Management Instrumentation) и нажмите Ок.
Также вы можете установить службы SNMP из командной строки PowerShell:
Enable-WindowsOptionalFeature -online -FeatureName SNMP
Настройка службы SNMP в Windows 10
После установки службы SNMP должны запустится автоматически. Откройте консоль управления Services (services.msc). В списке службы должны появится две новые службы:
- SNMP Service – это основная служба SNMP агента, которая отслеживают активность и отправляет информацию;
- SNMP Trap — получает сообщения ловушки (trap messages) от локальных или удаленных агентов SNMP, и пересылает сообщения в управляющие программы SNMP, которые работают на этом компьютере.
Откройте свойства службы SNMP. Если она остановлена, запустите ее, нажав кнопку Start и измените тип запуска (Startup type) на автоматический.
Перейдите на вкладку Agent. Заполните поля contact и location (здесь вы можете указать контактное имя пользователя и местоположение компьютера), и выберите список сервисов, данные которых нужно собирать и отправить устройству мониторинга.
Доступны следующие типы сервисов:
- Physical
- Applications
- Internet
- End-to-end
- Datalink and subnetwork
Перейдите на вкладку Security. Здесь вы можете настроить различные параметры безопасности для различных серверов SNMP.
В списке Accepted community names перечислены имена сообществ, чьи SNMP узлы проходят аутентификацию для отправки SNMP-запросов на этот компьютер.
Community — это имя, которое обладает такими же функциями, как логин и пароль.
Нажмите кнопку Добавить и укажите имя Community и один из пяти уровней доступа (None, Notify, READ ONLY, READ WRITE, READ CREATE). READ WRITE – это максимальный уровень доступа, при которых сервер управления SNMP может вносить изменения в систему. В системах мониторинга обычно достаточно выбрать READ ONLY, при этом сервер мониторинга может только опрашивать систему, но не вносить изменения.
В нашем примере мы добавили комьюнити public с разрешениями READ ONLY.
Далее добавьте список серверов системы мониторинга (по DNS имени или по IP адресам), от которых вы хотите разрешить получать SNMP пакеты.
Совет. Вы можете выбрать опцию ‘Принимать пакеты SNMP от любого узла’/Accept SNMP packages from these hosts, но это не безопасно.
Сохраните изменения и перезапустите службу SNMP.
На этом настройка службы SNMP в Windows 10 по сути завершена. Если вам нужно включить SNMP сразу на множестве компьютеров, вы можете удаленно установить и настроить службы с помощью PowerShell или GPO.
Are you looking for some of the best free SNMP manager software for Windows? If yes, you can explore some free and paid SNMP manager tools that you can use to manage your organizational computer network efficiently.
Within a computer network, SNMP stands for Simple Network Management Protocol, which regulates linked IP devices.
You can handle and track switches, servers, monitors, printers, virtual networks, and other network devices inside an organization with either of these freeware.
Also Read: 8 Best Network Mapping Software for Windows
7 Best Free SNMP Manager Software For Windows 10
In terms of bandwidth, efficiency, usability, connectivity, and traffic on servers, switches, PCs, etc., this SNMP monitoring software lets you monitor connected devices within a network.
Here is a list of the top 6 free SNMP Manager software for Windows that is also reasonably easy to set up and use.
Let’s begin and explore these SNMP managers.
Also Read: 6 Best Free WiFi Analyzer Software for Windows
1. PRTG Network Monitor
PRTG Network Monitor is one of the best SNMP monitoring software for Windows. It displays the live report in tabular and graphical formats, making viewing and evaluating the received data accessible.
You can conveniently allow email notifications on a sensor for specific events. It has many other great features, including developing a custom dashboard, creating a particular page as a PRTG Network Monitor homepage, using tickets to handle issues posed during monitoring, etc. You can use its support center or visit its official website in case of trouble.
Download Size: 309 MB
Pricing: 30 days free trial
Other features of PRTG Network Monitor
- Quick Download, Installation, and Configuration
- Easy to Use
- Comprehensive Network Monitoring
- Flexible Alerting
- PRTG Cluster Failover Solution
- Distributed Monitoring Using Remote Probes
- Data Publishing and Maps
- Multi-Language Interface
- In-Depth Reporting
- High-Security Standards
- Support for Customization
Also Read: 5 Best Free DVD Cover Maker Software For Windows [2023]
2. ManageEngine OpManager
ManageEngine OpManager is another great SNMP monitoring software for monitoring network performance, getting network device information, and finding network faults. It uses asynchronous SNMP trap messaging to get network management information.
- Device Discovery: ManageEngine OpManager automatically detects all the devices connected to your network. The best part is that you can automate the device discovery process.
- Fault Management: With a robust alert system, ManageEngine OpManager can notify you of potential network device and performance issues.
- Performance Monitoring: ManageEngine OpManager provides insightful reports that help network admins track critical KPIs such as network throughput, availability, and resource usage.
- Reports: Modern reporting dashboard with over 200 network monitoring widgets to keep track of critical data with the help of reports and customized dashboards.
3. Spiceworks Network Monitor
Spiceworks Network Monitor is another free SNMP manager software for tracking network devices and getting real-time status and warnings about them. It runs on a web browser. You can view the number of servers, switches, and sensors currently being tracked on the Dashboard.
Three parts of the main screen are used to add servers, computers, and switches. You can use the IP address or hostname, device’s name, domain name, and password to connect to a Windows server.
Overall, the Network Monitor from Spiceworks is very user-friendly. It can also view a monitoring unit, such as manufacturer, processor, RAM, disk space, last reboot, etc.
Download Size: 4.9 MB
Pricing: Free
Other features of Spiceworks Network Monitor
- Bandwidth Monitoring
- Baseline Manager
- Dashboard
- IP Address Monitoring
- Internet Usage Monitoring
- Network Diagnosis
- Network Resource Management
- SLA Monitoring
- Server Monitoring
- Uptime Monitoring
Also Read:
- 7 Best Free Movie Organizer Software [2023]
- 6 Best Free Soundboard Software For Windows [2023]
4. LoriotPro
LoriotPro is another good free SNMP manager for Windows. Use the free version, launch LoriotPro, and select ‘Use Free Edition’ from the available options. You can review its paid versions for 30 days if you wish.
It offers a tutorial module that helps you understand how LoriotPro functions. So you can thoroughly learn its capabilities before you start using it. By automatically scanning them, it discovers devices inside your network.
The choice of manual discovery is also provided in it. You can customize the discovery settings from the Setup menu > Option Discover Process. You can pick several router hops to discover, set, and use the range of IP addresses, set the running interval of the discovery process, find from a remote host, and assign host discovery parameters like DNS name, polling, etc.
This offers a tree-like view on the left panel for controlled computers. You can edit host properties by clicking a computer, such as DNS polling parameters, name resolution, options discovery, etc.
Download Size: 275 MB
Price: Free
Other features of LoriotPro
- Fault Management
- Configuration Management
- Topology
- Auto Discovery
- Web Enabled
- Protocol Support
- MIB Management
- IP Scanner
- Customizable GUI
- Plugin Technology
Also Read: 5 Best Free Dubstep Software For PC
5. PowerSNMP Free Manager
PowerSNMP Free Manager is another excellent free SNMP manager software for Windows. Network devices and SNMP agents can be introduced by accessing the Discover menu. You may use a range of IP addresses, broadcast IP addresses, or manually add an individual IP address to detect devices inside the network.
You must enter system information for an SNMP agent, including IP address, port number, SNMP version, and group.
It would then monitor the values of the added SNMP Agent variables, track traps, and network host pings. You can find MIB (loaded MIB file), watch item (added watch items), and System Discovery (added devices) on its main interface.
You can see objects in a hierarchical form in the MIB panel. Data like the module, OID, status, permission, sort, etc., are displayed when an item is clicked. You can see traps and track details in the panel below.
Download Size: 2.8 MB
Pricing: Free
6. SolarWinds Network Performance Monitor
SolarWinds Network Performance Monitor is a robust monitoring tool for network performance that can monitor system status with SNMP. It will discover network devices linked to your network automatically. You can use the Dashboard to track the availability and efficiency of connected network devices.
You can also see any devices, software, or utilities found on a network topology map and how the infrastructure ties together. The NetPath feature enables you to track hop-by-hop packet transfers, which can help you more accurately diagnose the origin of performance network problems.
The custom warning system allows you to set trigger-alert conditions. The app will notify you via email or SMS until the trigger conditions are met to let you know that an event has occurred. By heading to the All Active Alerts tab, the user can view a detailed list of alerts according to severity.
Download Size: 90.7 MB
Pricing: 30 days free trial with no limitations
Other features of SolarWinds Network Performance Monitor
- SNMP monitoring
- Automatically discovers connected network devices
- Network packet analysis
- Intelligent network maps with NetPath
- Create WiFi heat maps
- Alerts system
- Reports system
7. Icinga
Icinga is an open-source management platform that tracks the network, cloud service, and data center performance. The application is web-based and configured with the Domain Specific Language or via the GUI (DSL).
Choosing between the two allows you to track as much as you like. Using the Dashboard, you can log into the GUI and view the performance management summary.
The Dashboard indicates whether there are any efficiency or availability issues and color-codes them according to severity. Network machines, vital or down, are labeled in red.
Download Size: 43.8 MB
Other features of Icinga
- Web-based GUI
- DSL configuration available
- Dashboard
- Icinga Modules / Extensions
- 30 days free trial
In a nutshell
We summarize our list of the 6 best SNMP manager software for Windows. If you are looking for some free SNMP managers, you should check out Spiceworks Network Monitor and LoriotPro.
Please let us know which one you like the most in the comments section. Also, if we missed listing any functional SNMP managers, share them at codeitbro@gmail.com.
Himanshu Tyagi
Hello Friends! I am Himanshu, a hobbyist programmer, tech enthusiast, and digital content creator.
With CodeItBro, my mission is to promote coding and help people from non-tech backgrounds to learn this modern-age skill!
Monitor your Windows servers agentless, with the support of SNMP. Simply install and configure SNMP agents on your servers, install an On-Premise Poller, and your server for monitoring.
Windows 10 1803 or later
- Installing SNMP agents on Windows 10 1803 or later
- Configuring SNMP agents on Windows 10 1803 or later
Installing SNMP agents on Windows 10 1803 or later
The SNMP service is not listed in the Windows features list in the Control Panel on Windows 10. Install the SNMP service directly from Microsoft servers using any of the three steps below:
- Optional Features graphical interface
- PowerShell
- DISM
Installing using the Optional Features graphical interface
- Go to the Settings > Apps. In the search bar, search for Manage Optional Features.
- Click Add a Feature. In the Add an Optional Feature pop-up, select the following from the list: Simple Network Management Protocol (SNMP) and WMI SNMP Provider (to get all SNMP service configuration tabs).
- Click Add.
Installing using PowerShell
- Navigate to Start > Windows PowerShell folder > Windows PowerShell.
- Run the following command:
Add-WindowsCapability -Online -Name «SNMP.Client~~~~0.0.1.0»
Installing using DISM
- You can also use the deployment image servicing and management (DISM) tool. Go to Start > Command Prompt.
- Right-click the top result, and select Run as administrator.
- Execute the following command, and press Enter:
DISM /online /add-capability /capabilityname:SNMP.Client~~~~0.0.1.0
Configuring SNMP agents on Windows 10 1803 or later
- Navigate to Start > Settings > Control Panel.
- Under Administrative Tools, click Services.
- In the details pane, right-click SNMP Service and select Properties. If stopped, start the service by clicking the Start button, and change the Startup type to Automatic.
- In the Security tab, under Accepted community names, click Add.
- Under Community Rights, select a permission level for this host to process SNMP requests from the selected community.
- In Community Name, type a case-sensitive community name, and then click Add.
- Choose whether or not to accept SNMP packets from a host:
- To accept SNMP requests from any host on the network, regardless of identity, click Accept SNMP packets from any host.
- To limit accepting SNMP packets, click Accept SNMP packets from these hosts, and click Add. Then, type the appropriate host name, IP, or IPX address, and then click Add.
- Click Apply.
Configuring SNMP agents on Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2012 R2, or Windows Server 2016 or later
- Go to the Control Panel. Click on Programs > Programs and Features, and then click on Turn Windows features on or off. If you’re prompted with User Account Control dialog box, click Continue or Yes (varies with versions).
- In Turn Windows features on or off, check the box next to Simple Network Management Protocol (SNMP) or SNMP feature (again, varies with versions) and click OK.
- After this, follow the steps given above for Configuring SNMP agents on Windows 10 1803 or later.
Configuring SNMP agents on Windows NT systems
- Navigate to Start > Settings > Control Panel.
- Under Administrative Tools, click Services.
- In the Details pane, right-click SNMP Service, and select Properties.
- Under Accepted community names, click Add.
- In the Community Names box, type the community name to authenticate SNMP requests.
- Click Add to move the community name to the list of Accepted Community Names.
- Repeat steps 6 and 7 to add more community names.
- Choose whether to accept SNMP packets from any host or only from specified hosts:
- Click Accept SNMP Packets From Any Host, if you wish to accept SNMP packets from any host with no IP restriction.
- Click Only Accept SNMP Packets From These Hosts if you wish accept SNMP packets only from specific hosts. To enter the desired hosts click Add; type the name or address of the host in IP Host or IPX Address box, and then click Add.
- Repeat step 9 to add more hosts.
- In the Agent tab, specify information like comments about the user, location, and services.
- Click OK to apply the changes.
The SNMP agent running on Windows NT does not respond to Host Resource Data by default. To support this you may need Windows NT service pack 6 or above. Check your pack details before following the steps below.
Note: Windows NT 4.0 server does not come with a Host Resource MIB.
If you are running Windows NT Service Pack 6a and use Windows 2000 server, then follow these steps:
- Copy the %SystemRoot%\System32\hostmib.dll file from the Windows 2000 server to %SystemRoot%\System32folder on your Windows NT 4.0 Server.
- C:\WinNT is the value for %SystemRoot%
- If you don’t have Windows 2000 Server, then you can download the hostmib.dll file.
- If the above file isn’t compatible on your machine, you may download the compatible version from https://www.pconlife.com/fileinfo/hostmib.dll-info/
- Run regedit or regedt32, and add the following keys and values:
- Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HostMIB\CurrentVersion
- Value Name: Pathname
- Type: REG_SZ
- Data: C:\WinNT\system32\hostmib.dll
- Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents
- Value Name: 3
- Type: REG_SZ
- Data: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HostMIB\CurrentVersion
- For registering DLL using the Microsoft REGSVR utility, follow the steps below:
- Copy the file to C:\Windows\SysWOW64\ (for 32bit) or C:\Windows\System32\ (for 64bit)
- To complete this step, you should run Command Prompt as an administrator.
- Paste the following command into the Command Line window that opens, and press Enter.
%windir%\System32\regsvr32.exe hostmib.dll (for 32 bit)
%windir%\SysWoW64\regsvr32.exe hostmib.dll (for 64 bit)
- Restart your Windows NT box.
Configuring SNMP agent on Windows XP, Windows 2000, and Windows 2003 systems
- Navigate to Start > Settings > Control Panel.
- Under Administrative Tools, click Services.
- In the Details pane, right-click SNMP Service, and select Properties.
- Under Accepted community names, click Add.
- Under Community Rights, select a permission level for this host to process SNMP requests from the selected community.
- In Community Name, type a case-sensitive community name, and then click Add.
- Choose whether or not to accept SNMP packets from a host:
- To accept SNMP requests from any host on the network, regardless of identity, click Accept SNMP packets from any host.
- To limit accepting SNMP packets, click Accept SNMP packets from these hosts, and click Add. Then, type the appropriate host name, IP, or IPX address, and then click Add.
- Click Apply.
Testing SNMP on Windows
Test the SNMP reachability using MIB browser.
PowerShell-based SNMP configuration
In this section, we’ll cover:
- Prerequisites for Remote Execution
- Installation using PowerShell
- Steps to enable SNMP on a Windows device using PowerShell
- Input parameters for script execution
- Script commands and usage
Prerequisites for Remote Execution
To create remote sessions and run remote commands, the local and remote machines must meet the below requirements.
- System requirements
- User permissions
- Windows network/firewall permission
- Run as administrator
1. System requirements
The following are the system requirements for script execution on remote machines.
- To run remote sessions on Windows PowerShell 3.0, the local and remote computers must have:
- Windows PowerShell 3.0 or later.
- Microsoft .NET Framework 4 or later.
- Windows Remote Management 3.0.
- To run remote sessions on Windows PowerShell 2.0, the local and remote computers must have:
- Windows PowerShell 2.0 or later.
- Microsoft .NET Framework 2.0 or later.
- Windows Remote Management 2.0.
2. User permission
By default, the current user needs to be a member of the administrators group on the remote computer or provide the credentials of an administrator.
3. Windows network/firewall permission
The remote connection from both the server and client side must not be blocked by the firewall.
4. Run as administrator
Administrator privileges are mandatory to enable and configure SNMP.
Installation using PowerShell
- Navigate to Start > Windows PowerShell folder > Windows PowerShell.
- Run the following command: Add-WindowsCapability -Online -Name «SNMP.Client~~~~0.0.1.0»
NOTE:
- Please confirm that the prerequisites for remote execution are met.
- Check if the host and client devices are available on the same network domain.
- Enable PSRemoting on remote devices that this particular script will be executed on. This can be executed with a Remote Desktop connection.
Steps to enable SNMP on a Windows device using PowerShell
- Download the SNMPEnabler.ps1 script.
- Open the Windows PowerShell utility as an administrator.
- Run the SNMPEnabler.ps1 script and provide the required input parameters.
- Execute the script with the inputs provided. It will automatically enable and configure SNMP on your local or remote devices.
Input parameters for script execution
The following input parameters can be processed by the script executions.
Input parameter | Usage | Default values | Required? | Example |
---|---|---|---|---|
h | Host name that the SNMP service needs to be enabled in. | — | Mandatory (if -f not given) | -h ben-3515 |
f | Part of the file that contains multiple hosts. File format: (XXXXX.txt) s24x7-dev1 localhost 192.21.23.1 ben-3515.zohocorpin.com | — | Mandatory (if -h not given) | -f D:\SNMP\hostlist.txt |
username | Username of the account used for remote access | — | Mandatory for remote machines, optional for the local host. | -username workgroup\administrator |
pass | Password of the account used for remote access | — |
Optional for the local host. Remote: It can be provided as an argument. You’ll be asked for the password during remote execution. |
-pass password@987 |
onlyConfigure |
Used to configure the SNMP settings on already SNMP-enabled machines. Possible values are “true” or “false”. If “true”, the script will only go for configuration. |
false | Optional | -onlyConfigure true |
communityName | The SNMP community string that will be added after script execution. | public | Optional | -communityName networkcommunity |
snmpType |
Permission to be added from the community string. Allowed integer values: “1” — NONE “2” — NOTIFY “4” — READONLY “8” — READWRITE “16” — READCREATE |
4 | Optional | -snmpType 4 |
permittedHost | The host that needs SNMP access from the remote machine | The name of the default localhost machine that the script was executed from. | Optional | -permittedHost s24x7-dev7 |
debug |
Used for debugging.Possible values are “true” or “false”. |
false | Optional | -debug true |
Script Commands and Usage
1. Host-specific enabling
Options to enable and configure a single host with default or custom options.
Commands
1.1 To enable and configure SNMP (with default options) on a local machine:
Execute:.\SNMPEnabler.pst1 -h localhost
1.2 To enable and configure SNMP (with default options) on a remote machine:
Execute:.\SNMPEnabler.ps1 -h -username
1.3. To enable and configure SNMP (with custom input options) on a local machine:
Execute: .\SNMPEnabler.ps1 -h localhost -communityName -snmpType -permittedHost
1.4. To enable and configure SNMP (with custom input options) on a remote machine:
Execute:.\SNMPEnabler.ps1 -h -username -communityName -snmpType -permittedHost
1.5. To configure the community and permitted hosts on an SNMP-enabled local machine:
Execute.\SNMPEnabler.ps1 -h localhost -onlyConfigure true -communityName -snmpType -permittedHost
1.6. To configure the community and permitted hosts on an SNMP-enabled remote machine:
Execute.\SNMPEnabler.ps1 -h -username -pass -onlyConfigure true -communityName -snmpType -permittedHost
2. Bulk enabling (using an input file containing hosts)
By passing the file path that contains a list of hosts, you can enable and configure SNMP for multiple servers.
Commands
2.1 To enable and configure SNMP (with default options) on multiple local or remote machines:
Execute:.\SNMPEnabler.ps1 -f -username
2.2 To enable and configure SNMP (with custom options) on multiple local or remote machines:
Execute:.\SNMPEnabler.ps1 -f -username -communityName -snmpType -permittedHost
2.3 To configure the community and permitted hosts on SNMP-enabled local or remote machines:
Execute:.\SNMPEnabler.ps1 -f -username -onlyConfigure true -communityName -snmpType -permittedHost
Related articles
- Configuring SNMP agents on different Linux servers
- Adding a server monitor (agentless)
-
On this page
- Windows 10 1803 or later
- Windows Vista; Windows 7, 8, 8.1, or 10; Windows Server 2008, 2008 R2, 2012, 2012 R2, 2016 or later
- Windows NT systems
- Windows XP, Windows 2000, and Windows 2003 systems
- Testing SNMP agents on Windows
- PowerShell-based SNMP configuration