[python-win32] Using Python and WMI for multiple machines

Becky Mcquilling ladymcse2000 at gmail.com
Wed Feb 20 07:32:17 CET 2008


I'm new to Python and wanted to do what is a pretty routine and common admin
function,  simple enough in VBScript, but wanted to try it in Python as
well.  I'm having troulbe working it out on my own.

Here goes:

I have a text file c:\servernames.txt.  I want the script to read from that
file, each line being a different machine name, then give me a list of the
services on the machine and the state, write the result to a log file.

The wmi part is easy to produce, on a single machine, it's stripping the
contents from a text file one at a time and then logging it to a file, that
I havne't gotten quite right.

I'm sure this is pretty simple for most of you, I just can't quite seem to
get it.

bmcquill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080219/85fe4040/attachment.htm 


More information about the python-win32 mailing list