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.
In reply to Help using Win32::OLE by rlb3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |