Python and ADSI
waldekO
osuchw at ecn.ab.ca
Fri Jun 14 16:58:30 EDT 2002
I am not sure if that is what you want but I am using something
similar to access user on WinNT domain
from win32com.client import Dispatch
adsi = Dispatch('ADsNamespaces')
nt = adsi.GetObject('','WinNT:')
for domain in nt:
domain.Filter = ("User",)
for usr in domain:
print domain.name, usr.name, usr.fullname
In your case you probably want:
ldap = adsi.GetObject('','LDAP://correct ldap path goes here') and
then you would do your stuff.
http://www.microsoft.com/ntserver/downloads/bin/nts/adsi25.chm
should get you started
waldekO
Gerhard Haering <gerhard at bigfoot.de> wrote in message news:<slrnagjuud.15g.gerhard at lilith.my-fqdn.de>...
> Does anybody have an example script using win32com and ADSI to access the users
> in an active directory?
>
> Gerhard
More information about the Python-list
mailing list