To use SNMP, you must first configure the SNMP settings of the vCenter Server.

Connect to a vSphere server.

1

View the current SNMP configuration settings of the vCenter Server from the $srv variable.

Get-AdvancedSetting –Entity $srv  –Name snmp.*
2

Modify the SNMP receiver data.

Get-AdvancedSetting –Entity $srv  –Name snmp.receiver.2.community | Set-AdvancedSetting –Value public
Get-AdvancedSetting –Entity $srv  –Name snmp.receiver.2.enabled | Set-AdvancedSetting –Value $true
Get-AdvancedSetting –Entity $srv  –Name snmp.receiver.2.name | Set-AdvancedSetting –Value 192.168.1.10

Now you can use SNMP with vCenter Server.