Worklet: Add SNMP Service

  • 3 December 2020
  • 0 replies
  • 37 views

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