vb.net - LDAP Gettling a list of logon names -


I need help in my program to get a list of user logon names in a group.

This is what I have done so far, but it only gives to all the users ... which I need to cut for those in a group, of which my name is.

  Options clear on the import system. Directory Services Importing Systems Directory Services Active Directory Module Module 1 sub-main () Sedimentary Edinander as new directory services. Search the ozozed as a new system ("LDAP: // OU = user, OU = ERWIN, OU = KNS, DC = corp, DC = NNS, DC = COM"). Directory Services Results given in the form of Directorate Search (Accountant) Director Services. Search Result Call as Origin Direct Services. Search: 'This Work' objSearch.Filter = "Department = Engineering" oResults = objSearch.FindAll in oResult Console for each oResult. WriteLine (oResult.GetDirectoryEntry.Properties ("sAMAccountName"). Value) Next End Sub End Module  

Try changing the Filler to

  objSearch.Filter = "(& ObjectCategory = user) (memberOf = CN = employee, OU = security group, DC = your domain, DC = com)) " 

The group is employee.

Source:

Note: I could not test it. Tell me if it works or not.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -