[python-win32] ADSI and LDAP Searches
Mark Hammond
mhammond at skippinet.com.au
Thu Jun 30 01:02:48 CEST 2005
I've never used ADSI via ADODB, but have managed to use the raw ADSI
interfaces directly. Check out your
lib\site-packages\win32comext\adsi\demos directory.
> Here is a search for a Windows Group in Perl:
> my $hdb = Win32::OLE->new("ADODB.Connection");
> $hdb->{Provider} = "ADsDSOObject";
> $hdb->Open("ADSI Provider");
> $rs =
> $hdb->Execute("<$adsdomain>;(&(objectCategory=Group)(name=$gro
> upname));adspa
> th;SubTree");
>
>
> Here is what I have in Python so far:
> adsi = win32com.client.Dispatch('ADsNameSpaces')
> ldap = adsi.getobject('','LDAP:')
> DSO = ldap.OpenDSObject("","","", 0)
>
> It errors on the DSO line.
What error exactly?
Mark
More information about the Python-win32
mailing list