Listing all machines in a domain

Dirk Hagemann usenet at mail-2-me.com
Thu Oct 16 15:28:01 EDT 2003


"Tim Golden" <tim.golden at viacom-outdoor.co.uk> schrieb im Newsbeitrag
news:8360efcd.0310160019.2be6efd6 at posting.google.com...
> 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


Thanks for the link! I tried this code once before, but I got an error
because of this
"WinNT:" in the code. But on tuesday I will try again.I don't know if I also
got machines which are only switched on - but that'spossible (I will test
this as well on tuesday. Now I start into myextra-long weekend - yet :-) ).
Dirk






More information about the Python-list mailing list