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.