views:

476

answers:

2

How can I retrieve all users from Active Directory using VBScript?

+1  A: 

This should get you started

Tester101
+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
I think on the second line "oObject" should be "oDomain"
Tester101
You were right, I corrected my code
Webleeuw