LucD I was not aware of this thank u.
After reviewing the document you pointed me to I've changed the port number 171 but I still get the same error when trying to add a new target.
get-vmhostsnmp
Enabled Port ReadOnly Communities
------- ---- --------------------
True 171 {Public}
This has resolve the error if I try to disable and enable it.
but addtarget I still get.
Set-VMHostSnmp : 07/01/2013 10:09:21 Set-VMHostSnmp Object reference not set to an instance of an object.