Skip to main content

Worklet: Add SNMP Service


Evaluation:

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

Remediation Code:

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.

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings