Thanks for all the suggestions. I did find a little snippet that seems to do what I want, however, it seems to have problems returning, or printing anyway, multiple attributes. I only seem to get the first attribute. Any ideas?
my $strBase = "<LDAP://dc=bob,dc=com>;"; # BaseDN should be the search base my $strFilter = "(&(objectCategory=user)(ObjectClass=user)(samAccountName=doug));"; # Valid LDAP search filter #my $strAttrs = "department,physicalDeliveryOfficeName;"; # Comma-seperated list my $strAttrs = "displayname,department;"; # 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; my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $strScope); $objRS->MoveFirst; while (not $objRS->EOF) { print $objRS->Fields(0)->Value,"\n"; $objRS->MoveNext; }