Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: dsFindPath Limitation 20 Characters SAMAccountName
adsiPath= dsfindpath ("LDAP://DC=mydomain,DC=net", "(& (objectClass=User) (SAMAccountName=CharlieBrown))")
You might want to consider performing a multi-property search as a way to have more confidence in your results. A link to the 'sAMAcountName' property syntax http://msdn.microsoft.com/en-us/library/ms679635(VS.85).aspx More: The presentation of Active Directory attributes by GUI interfaces and even some command line software can be confusing because the presentation doesn't necessarily correlate with how the attributes are actually stored in Active Directory.
I believe you are looking for the 'userPrincipalName' or UPN which is used to log on to a domain. The UPN is the logon name and the UPN suffix that must be appended to the name. The UPN suffix is usually an at sign(@) followed by the domain name, i.e. joeuser@mydomain.com.
MSFT considers the 'sAMAccountName' property a down level name maintained for backward compatibility with pre-W2k systems. That is why it has a 20 character limit for user objects.
Article ID: W17525
Filename: dsFindPath Limitation.txt
File Created: 2012:11:26:09:50:34
Last Updated: 2012:11:26:09:50:34