VBScript LDAP: Is there a way to query for physicalDeliveryOfficeName using the email address in Act
- by phill
I'm attempting to utilize VBScript to connect pull the physicalDeliveryOfficeName attribute in Active Directory by providing the email address.
I know how to do it with a common name like the following:
Set MyUser = GetObject ("LDAP://cn=" & uname & ",ou=" & strname & ",DC=bobdom,DC=net")
However only the email address is available. How to do this? I've even tried
Set MyUser = GetObject ("LDAP://mail=" & uname & ",ou=" & strname & ",DC=bobdom,DC=net")
and that doesn't work.