Characters with Accents and LDAP search

I’m using
the following script to find a user which works
fine so long as
the CN value doesn’t contain a
character with an accent, in the example below I’ve used Léo Apotheker, unfortunately the letter é
produces an ‘Object not found
error’. Does anyone have any
idea what is going on here? Is the problem with VBScript or AD?

Many thanks

Steven

Set dso =
GetObject("LDAP:")

Set objUser = dso.OpenDSObject( _

"LDAP://APHRODITE/CN=Léo
Apotheker,OU=Staff,DC=Domain,DC=Com", _

"Domain\User",
_

"password", _

ADSSECUREAUTHENTICATION + ADSSERVERBIND)

objUser.AllowLogon
= Disabled

objUser.SetInfo

-------------------------------------------------------------------This email is from Oldham Sixth Form College, but expresses the viewsof the sender and not necessarily the views of the college. The emailand any files transmitted with it are confidential to the intendedrecipient at the e-mail address to which it has been addressed. It maynot be disclosed or used by any other than that addressee, nor may itbe copied in any way. If received in error, please notifyPostmaster@osfc.ac.uk quoting the name of the sender.This message has been scanned for viruses by F-Secure Anti-Virus.Please note that we cannot accept any responsibility for anytransmitted viruses. It is, therefore, your responsibility to scanattachments (if any).

Im using the following script to find a user which works fine so long as the CN value doesnt contain a character with an accent, in the example below Ive used Léo Apotheker, unfortunately the letter é produces an Object not found error. Does anyone have any idea what is going on here? Is the problem with VBScript or AD?

ADSSECUREAUTHENTICATION + ADSSERVERBIND)objUser.AllowLogon = DisabledobjUser.SetInfo-------------------------------------------------------------------This email is from Oldham Sixth Form College, but expresses the viewsof the sender and not necessarily the views of the college. The emailand any files transmitted with it are confidential to the intendedrecipient at the e-mail address to which it has been addressed. It maynot be disclosed or used by any other than that addressee, nor may itbe copied in any way. If received in error, please notifyPostmaster@osfc.ac.uk quoting the name of the sender.This message has been scanned for viruses by F-Secure Anti-Virus.Please note that we cannot accept any responsibility for anytransmitted viruses. It is, therefore, your responsibility to scanattachments (if any).

This message is for use by the intended recipient and contains information that may be privileged, confidential and/or under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system.

This should do the trick, I haven't tested but it should put you on the right track. (&(objectclass=user)(objectcategory=user)(!postOfficeBox=SRV)(company=PSEBAS)( !userAccountControl:1.2.840.113556.1.4.803:=2))Gary.On Apr 13, 2017 10:45 AM, adriaoramos@xxxxxxxxxxxxxxxx wrote:Please, I need to search all user in my
company that are active, don’t have the word SRV in P O BOx attribute
and PSEBA Sin company attribute . I created this ldap search, but
there is something wrong in it. Can anyone help me with it?

LEGAL ADVICE
This message is for use by the intended recipient and contains information that may be privileged, confidential and/or under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system.