ADSI, SQL, Exchange Server 2010
- by WernerCD
Maybe I'm barking up the wrong tree...
We have a Domain Controller "DC1". We have Exchange Server 2010 "Postman".
Say I have an Address Book:
And I add a few contacts to it:
How then do I get the data from that contact via ADSI? Say I want the Job Title or CustomerID field that I filled out in the Contacts list?
SELECT * FROM OPENQUERY(ADSI,
'SELECT
EXTENSIONATTRIBUTE15
,DISPLAYNAME
,GIVENNAME
,NAME
,SN
,SAMACCOUNTNAME
FROM ''LDAP://DC=ATLANTICGENERAL,DC=ORG''
WHERE USERACCOUNTCONTROL=512
AND SAMACCOUNTTYPE=805306368
AND OBJECTCLASS=''PERSON''
AND OBJECTCLASS=''USER''
ORDER BY
SAMACCOUNTTYPE
')
How can I tie the Contact Card to an Active Directory User, so that I can edit either the AD account information OR the Exchange information and have them synced up?