![]() |
VBScript AD Select all users beginning with!!!
Hi to all you guys, this is my first thread, well this is my question: I´m using an LDAP SQL statement to retireve a user OU, but I want to look the OUs for all users beginning with a letter Example: A%
This is the code I use: Code:
Set rs = CreateObject("adodb.recordset") |
Re: VBScript AD Select all users beginning with!!!
I am not a LDAP SQL expert but you can refer to the LIKE operator which we have.
Code:
.... WHERE sAMAccountName LIKE 'A%' |
Re: VBScript AD Select all users beginning with!!!
Thanks for the repply, I though the same but it gives me this error when run it :
Provider: One or more errors occurred during processing of command. It doesn't give an error number or anything but that |
Re: VBScript AD Select all users beginning with!!!
Try
Code:
....WHERE sAMAccountName LIKE 'A%' |
Re: VBScript AD Select all users beginning with!!!
Quote:
Thank you for your repply. |
Re: VBScript AD Select all users beginning with!!!
sorry try an asterick instead of a percent sign.*
|
Re: VBScript AD Select all users beginning with!!!
Thanks a lot, with the * works just great.
|
Re: VBScript AD Select all users beginning with!!!
no problem
|
| All times are GMT +5.5. The time now is 13:46. |