![]() ![]() Using schema properties is much better than using UAC flags. ![]() Yu seem to have lost some parts of your code. Notice that "strQuery" is never set to anything. You jsust call execute without ever setting the query. It never uses the query that you have assigned values for. The problem with your original code is that it is missing a couple of steps. ![]() Now, these values are the exact same of a randomly selected user that does appear on my list. UserAccountControl: 0x200 = ( NORMAL_ACCOUNT ) ObjectClass: top person organizationalPerson user ObjectCategory: CN=Person,CN=Schema,CN=Configuration,DC=fabrikam,DC=com csv file for specific user, who is not there, yet his values are listed like this in ADSI Edit: Remove the 'bang' and it will search for disabled users.Įven with the filter exactly as you wrote it, I still only get the same approx. TO filter out the disabled accoutns you need to include a negative schema flag match. LDAP filters do not allow embedded quotes single or double. StrFilter="(&(objectclass=user)(objectcategory=person)) " The filter would bebetter if it specified the inclusinve accoutns and did not attempt to use a type. csv file, and can see that my problem isn't related to specific OUs some users from "R&D" areĭoesn't seem to be alphabetically related either "Eric" and "Frank" are there, while "Evan" isnt. I tried dumping the content of the array into a. There doesn't seem to be any system in which users are left out, and which come into the Array. Myusr = objRecordSet.Fields("sAMAccountName").Value ObjCommand.Properties("Page Size") = 1000ĭisabled = objRecordset.Fields("UserAccountControl") ObjCommand.Properties("Cache Results") = False StrAttributes = "sAMAccountType,sAMAccountName,UserAccountControl" However, only about 60% of the expected number of users end up in the array. I am using this code to fill an array with the users that are not disabled. ![]() I have been using these ADO search tips: I am trying to get a list of all "not disabled" users in our domain. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |