Using Python to start SNMP service on remote XP hosts...

kyosohma at gmail.com kyosohma at gmail.com
Fri Mar 23 16:29:26 EDT 2007


On Mar 23, 2:51 pm, "KDawg44" <KDaw... at gmail.com> wrote:
> Hi,
>
> I am very new to Python and really just began studying and using it.
> I read that it was relatively easy to interact with Windows machines
> with Python and I am desperately looking for something to replace
> VBScript (not a big fan).
>
> I am currently deploying a Gentoo Linux SNMP server running Cacti in
> my network and would like my XP machines to report traps to this box.
> The SNMP service is not running by default on the machines in the
> network and instead of going to each one at a time, I thought I could
> write a script.
>
> Does anyone have any suggestions about how I go about accomplishing
> this?
>
> Thanks so much for any suggestions.

It looks like you can use Tim Golden's WMI module to do what you need.
See this other post for info:
http://www.thescripts.com/forum/thread541366.html

You'll have to find out the exact name of the service, loop through
and use an IF to test for it and when it is found, try starting it.

Mike




More information about the Python-list mailing list