dispay all Active directory User information using Openquery

Sagarp
Posted by Sagarp under Sql Server category on | Views : 3510
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'

SELECT * from OPENQUERY (ADSI,'SELECT streetAddress,mobile,mail,department,sn,givenName,sAMAccountName from ''LDAP://DC=xxx,DC=com'' WHERE objectClass=''User''')

Comments or Responses

Login to post response