RE: WMI to SNMP problems
- From: v-garych@xxxxxxxxxxxxxxxxxxxx ("Gary Chang[MSFT]")
- Date: Mon, 06 Feb 2006 03:20:42 GMT
Hi Thomee,
Our WMI specialist suggest you may need to check the the SNMP write
community first, in order to make sure it's given to WMI so the SNMP WMI
provider uses the write community. Please refer to the qualifier
AgentWriteCommunityName of the SNMP provider:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/
qualifiers_specific_to_the_snmp_provider.asp
And the following is some example C# code to do this:.
ManagementScope s = new ManagementScope("root\\snmp\\localhost");
SelectQuery query = new
SelectQuery("SNMP_RFC1213_MIB_system",null,DesiredProperties);
EnumerationOptions Enum_opts = new EnumerationOptions();
Enum_opts.Context.Add("AgentAddress",AgentAddress.ToString());
Enum_opts.Context.Add("AgentReadCommunityName",AgentReadCommunity);
Enum_opts.Context.Add("Correlate",false);
ManagementObjectSearcher search = new
ManagementObjectSearcher(s,query,Enum_opts);
foreach (ManagementBaseObject objSys in search.Get())
{
foreach (PropertyData Prop in objSys.Properties)
{
Console.WriteLine(Prop.Name + "\n-----------------\n" +
Prop.Value.ToString() + "\n");
}
Console.WriteLine();
}
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
.
- References:
- RE: WMI to SNMP problems
- From: "Gary Chang[MSFT]"
- RE: WMI to SNMP problems
- Prev by Date: Re: VBS ConnectServer performance
- Next by Date: RE: Deleting an object from WMI
- Previous by thread: RE: WMI to SNMP problems
- Next by thread: RE: WMI to SNMP problems
- Index(es):
Relevant Pages
|