When I run this script with the proper IPs and community strings I get the following:
>>## SNMP Configuration - using PowerCLI
>>## ==============================================
>>
>>## ESXi host to be configured (NOT vCenter -- use a specific host!!)
>>$esxihost = 'myesxihost.mydomain'
>>
>>## Conenct to ESXi Host (NOT vCenter -- use a specific host!!)
>>Connect-VIServer $esxihost -user root -password 'mypassword'
>>
>>## Enable SNMP
>>Get-VMHostSnmp | Set-VMHostSnmp -Enabled:$true
>>
>>## Add SNMP Communities
>>Get-VMHostSnmp | Set-VMHostSnmp -ReadOnlyCommunity public,community1,community2
>>
>>## Add SNMP Targets
>>Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "public" -TargetHost "mysnmptarget1.mydomain" -TargetPort 162 -AddTarget
>>Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "community1" -TargetHost "mysnmptarget2.mydomain" -TargetPort 162 -AddTarget
>>Get-VMHostSnmp | Set-VMHostSnmp -TargetCommunity "community2" -TargetHost "mysnmptarget3.mydomain" -TargetPort 162 -AddTarget
>>
>>## Send Test Traps
>>Test-VMHostSNMP -HostSNMP (Get-VMHostSNMP)
>>
>>## Disconnect from ESXi Host
>>Disconnect-VIServer $esxihost -Confirm:$false
>>
I do not see any evidence of a snmp service or deamon installed on any of my ESXi 5 blades. The ESX 4.1 systems are working fine.