NetGetAnyDCName() - get PDC of a foreign WinNT-domain

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Jan 22 08:54:25 EST 2004


>Hi!
>
>I'm trying to get the PDC-Computername of a foreign WinNT-domain, but
>I only managed to get the PDC of my own domain with this code:
>pdc=win32net.NetGetAnyDCName()

If you don't specify any params to that call, win32net will assume
you're looking at your own domain. It can take two params: server & domain.

If you do this:

pdc = win32net.NetGetAnyDCName (None, "name_of_other_domain")

it should work.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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