net view /domain

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Aug 11 10:46:36 EDT 2005


[usenet at mail-2-me.com]
| Hi!
| 
| Is there a module I can use for "net view /domain" so list all
| available domains and workgroups in a windows-network? I'm looking for
| something like win32net.NetServerEnum, because I don't really want to
| do this by "popen".

I think this will do it. (The WinNT object hierarchy usually 
repays a look; I keep forgetting it's there).

TJG

<code>
import win32com.client

network = win32com.client.GetObject ("WinNT:")
for group in network:
  print group.name

</code>

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list