Thu 27 Apr 2006
How do you query Active Directory with Perl?
Posted by Dave under Perl , Questions[2] Comments - Post Your Own
This is really an open question but how do you submit queries into Active Directory using Perl? Do you use Net::LDAP or Win32::OLE? I suppose for non-Win32 versions of Perl it would have to be Net::LDAP, but do Windows Perl users really use ADSI via Win32::OLE?
2 Responses to “How do you query Active Directory with Perl?”
Leave a Reply
You must be logged in to post a comment.
April 28th, 2006 at 1:07 am
I’m using Win32::OLE and ADSI. But I haven’t figured out how to correctly perform a search accross multiple containers. Anyone have tips?
-Perry-
May 2nd, 2006 at 8:58 pm
I’ve tried to use Net::LDAP but kept having problems. Now I use ADSI’s LDAP provider:
use Win32::OLE;
$user=Win32::OLE->GetObject(“LDAP://CN=user name,CN=Users,DC=mynetwork,DC=com”);
print $user->{‘displayname’}, “\n”;
Pretty simple!