Listing all machines in a domain

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Oct 16 04:19:17 EDT 2003


dirkhagemann at firemail.de (Dirk Hagemann) wrote in message news:<41cb194b.0310150354.13c4cb2c at posting.google.com>...
> I need to get a list of all machines in a (Windows-)domain. So I used
> as described in the ActiveState Python Documentation
> win32net.NetServerEnum('',100,win32netcon.SV_TYPE_ALL,'domain-x') to
> get this list from the PDC. But the result is only a list of all
> machines which are logged-in. What I really need is a list of ALL
> machines - taht means also the machines which belong to this domain,
> but are logged-off (or simply switched-off).

I'm a little surprised to find that this call returns only machine
logged-on (and do you, by the way, mean "switched on" or really
"logged on" - ie with someone's username active on the machine?).
However, see if this thread from the Python win32 group is of any use
to you.

http://aspn.activestate.com/ASPN/Mail/Message/1785767

TJG




More information about the Python-list mailing list