rlb3 has asked for the wisdom of the Perl Monks concerning the following question:
I'm try to pull some information from Active Directory using Win32::OLE. I'm using example code from the Active Directory cookbook but i'm still getting this error:
Here is the code I'm using.OLE exception from "Provider": <p>One or more errors occurred during processing of command.</p> Win32::OLE(0.1702) error 0x80040e14 in METHOD/PROPERTYGET "Execute" at sdomain.pl line 11
my $strBase = "LDAP://dc=corp,dc=example,dc=edu;"; + # BaseDN should be the search base my $strFilter = "(&(objectclass=user)(objectcategory=Person));"; + # Valid LDAP search filter my $strAttrs = "name,mailNickname,extensionAttribute1;"; + # Comma-seperated list my $strScope = "Subtree"; + # Should be on of Subtree, Onelevel or Base use Win32::OLE; $Win32::OLE::Warn = 3; my $objConn = Win32::OLE->CreateObject("ADODB.Connection"); $objConn->{Provider} = "ADsDSOObject"; $objConn->Open("Active Directory Provider"); my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $str +Scope); $objRS->MoveFirst; while (not $objRS->EOF) { print $objRS->Fields(0)->Value,"\n"; $objRS->MoveNext; }
Any help would be great.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help using Win32::OLE
by Anonymous Monk on Mar 27, 2006 at 22:39 UTC | |
|
Re: Help using Win32::OLE
by planetscape (Chancellor) on Mar 28, 2006 at 05:42 UTC | |
|
Re: Help using Win32::OLE
by strat (Canon) on Mar 28, 2006 at 07:55 UTC | |
|
Re: Help using Win32::OLE
by monarch (Priest) on Mar 27, 2006 at 22:10 UTC |