AutomoxAutomox

Worklet: Add SNMP Service

ncaraway
December 3, 2020 at 5:09 pm UTC

Evaluation:

6 lines
if (Test-Path -Path "C:\Windows\System32\SNMP.exe") {
Exit 0
} else
{ 
Exit 1 
}

Remediation Code:

3 lines
Install-WindowsFeature SNMP-Service 
Start-Sleep -s 10
Restart-Service -name SNMP

Note: The Start-Sleep and Restart-Service seem to help in making sure the snmp service has enough time to install and make sure the service gets started after the install.
The snmp service will only be added if it is not already on the system.

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack