WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI LDAP CDO
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

List User Paths on Default Domain

 Keywords: List enumerate User Users LDAP Paths Default Domain RootDSE

; Notice the server-less ADSI path.
;  Get the domain DN with a server-less ADSI path.
objRootDSE  = GetObject("LDAP://rootDSE")
domain = objRootDSE.Get("defaultNamingContext")
sUsersPath = "LDAP://cn=users,":domain
users =  GetObject(sUsersPath) ;Get object Users container
lValues = ""
ForEach obj In users
   If obj.Class == "user"
    lValues = lValues:@TAB:"LDAP://CN=":obj.CN:";CN=Users;":domain
   EndIf
Next
; List all objects in the user container of the default domain.
UserPath =  AskItemlist("Objects in Users", StrTrim(lValues), @TAB, @UNSORTED , @SINGLE )

Article ID:   W18054
Filename:   List User Paths on Default Domain.txt
File Created: 2011:06:07:11:03:52
Last Updated: 2011:06:07:11:03:52