Error 0x800F0922 or 0x800F0902 when installing SNMP Service

Had an interesting issue. Our installation of SNMP service kept failing.

The same error was shown when using PowerShell, DISM and Server manager.

Long story short, weirdly the installation is only deemed successful if the service can start, if it cannot, the whole installation is rolled back.

In our case a 3rd party app was hogging UDP 161 and SNMP failed to start hence the installation kept rolling back.

The culprit was identified by looking for the process that uses UDP 161 in output of command “NETSTAT -anb”

After killing this process installation work