Rights for SNMP service

  • Thread starter Thread starter Dan Pavel
  • Start date Start date
D

Dan Pavel

Hi,

I need to verify from my application if the SNMP Service on several
computers have the Community set to "public" and the rights as "READ
WRITE".
I tried to do it by WMI but with no success. Any help will be
appreciated.

Best regards,
Dan
 
using System.Management;

ManagementObjectSearcher DemoSearcher = new ManagementObjectSearcher("SELECT
* FROM Win32_Service");
ManagementObjectCollection AllObjects = DemoSearcher.Get();

foreach (ManagementObject PausedService in AllObjects)
{
Console.WriteLine("Service = " + PausedService["Caption"]);
}


for adding system.managment u need to add it manualy through reference.
hope it will work
and then according to ur situation u can change the search crieteria in
queery.
 
Thank you for your answer. I've already done this.
My problem is that I don't know how to access the settings of the SNMP
Service. If you open Services->SNMP Service->Security Tab->Community
public, Rights READ WRITE.
I need to verify these values from my app and if the public community is
not set or the rights are not READ WRITE, I will need to inform the user
to change them accordingly.

Thanks,
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top