M
Mark Parter
I'm having extreme difficulty getting SNMP to work via
WMI. I've been trying to get this to work for the last 3
days and am getting no further forward.
I have the following script;
*********************************************************
strTargetSnmpDevice = "10.20.16.*"
strTargetSnmpCommunity = "*****"
Set objWmiLocator = CreateObject
("WbemScripting.SWbemLocator")
Set objWmiServices = objWmiLocator.ConnectServer
("","root\snmp\localhost")
Set objWmiNamedValueSet = CreateObject
("WbemScripting.SWbemNamedValueSet")
objWmiNamedValueSet.Add "AgentAddress",
strTargetSnmpDevice
objWmiNamedValueSet.Add "AgentReadCommunityName",strTarget
SnmpCommunity
Set colSystem = objWmiServices.InstancesOf
("SNMP_RFC1213_MIB_system",, objWmiNamedValueSet)
For Each objSystem In colSystem <--ERROR HERE
MsgBox "sysContact: " & objSystem.sysContact
Next
*********************************************************
I get a 80041010 error on the line indicated above. When
I look in the wbemcore.log file, I see th following
message;
*********************************************************
Class provider 'MS_SNMP_CLASS_PROVIDER' installed in
namespace 'root\snmp\localhost' failed to enumerate
classes, returning error code 0x80041001. Operations will
continue as if the class provider had no classes. This
provider-specific error condition needs to be corrected
before this class provider can contribute to this
namespace.
*********************************************************
I have the SNMP Protocol installed, the SNMP Provider
installed and also the WMI SDK. It's a Windows 2000
Server SP4 machine I'm testing on to talk to a Cisco
router.
Help me please before I go insane
WMI. I've been trying to get this to work for the last 3
days and am getting no further forward.
I have the following script;
*********************************************************
strTargetSnmpDevice = "10.20.16.*"
strTargetSnmpCommunity = "*****"
Set objWmiLocator = CreateObject
("WbemScripting.SWbemLocator")
Set objWmiServices = objWmiLocator.ConnectServer
("","root\snmp\localhost")
Set objWmiNamedValueSet = CreateObject
("WbemScripting.SWbemNamedValueSet")
objWmiNamedValueSet.Add "AgentAddress",
strTargetSnmpDevice
objWmiNamedValueSet.Add "AgentReadCommunityName",strTarget
SnmpCommunity
Set colSystem = objWmiServices.InstancesOf
("SNMP_RFC1213_MIB_system",, objWmiNamedValueSet)
For Each objSystem In colSystem <--ERROR HERE
MsgBox "sysContact: " & objSystem.sysContact
Next
*********************************************************
I get a 80041010 error on the line indicated above. When
I look in the wbemcore.log file, I see th following
message;
*********************************************************
Class provider 'MS_SNMP_CLASS_PROVIDER' installed in
namespace 'root\snmp\localhost' failed to enumerate
classes, returning error code 0x80041001. Operations will
continue as if the class provider had no classes. This
provider-specific error condition needs to be corrected
before this class provider can contribute to this
namespace.
*********************************************************
I have the SNMP Protocol installed, the SNMP Provider
installed and also the WMI SDK. It's a Windows 2000
Server SP4 machine I'm testing on to talk to a Cisco
router.
Help me please before I go insane