How can I retrieve all users from Active Directory using VBScript?
+2
A:
Dim oDomain = GetObject("LDAP://OU=YourOU,DC=YourDomain,DC=com")
For Each oUser in oDomain
WScript.echo oUser.Get("distinguishedName")
Maybe this will get you running?
Webleeuw
2009-11-23 14:17:43
I think on the second line "oObject" should be "oDomain"
Tester101
2009-11-23 14:58:37
You were right, I corrected my code
Webleeuw
2009-11-24 10:01:12