Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: PERL en ADSI

by PerlUserNL (Initiate)
on Jan 11, 2011 at 14:37 UTC ( #881679=note: print w/ replies, xml ) Need Help??


in reply to Re^3: PERL en ADSI
in thread PERL en ADSI

use strict; use warnings; use Win32::OLE; $ou=Win32::OLE->GetObject("LDAP://ou=Users,dc=myDomain,dc=net"); @filter=("user"); $ou->{filter}=\@filter; foreach $obj (in $ou){ print "$obj->{name}\n"; }

I add the strict en warnings by default in my scripts, But i forgot to posted it here...


Comment on Re^4: PERL en ADSI
Download Code
Re^5: PERL en ADSI
by Corion (Pope) on Jan 11, 2011 at 14:46 UTC

    This code cannot compile. Please show some effort and eliminate the most obvious errors before posting.

Re^5: PERL en ADSI
by Sinistral (Prior) on Jan 11, 2011 at 15:46 UTC

    corion is correct, this code won't work at all. Perhaps you want to look at a working LDAP / Active Directory example: Help using Win32::OLE

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://881679]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-08-31 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls