How to Query Active Directory (AD) from SQL Server

sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 'ADSDSOObject', 'adsdatasource'



SELECT * FROM OpenQuery
(
ADSI,   --Name of the linked server for Active directory, created in step 1
'SELECT title, displayName, sAMAccountName, givenName  
FROM ''LDAP://DC=TestDomain''   
where objectClass = ''User'''       
)

posted @ lunedì 31 agosto 2009 15:00

Print

Comments on this entry:

# re: How to Query Active Directory (AD) from SQL Server

Left by he at 13/11/2014 19:09
Gravatar
rapidly competitive massive credit score check monetary divergent huge credit report score important adaptability 21

# re: How to Query Active Directory (AD) from SQL Server

Left by Petty at 28/07/2015 04:53
Gravatar

# re: How to Query Active Directory (AD) from SQL Server

Left by Yepi at 23/09/2015 19:54
Gravatar
Help to comment or postings caused extra attention.
Comments have been closed on this topic.
«aprile»
domlunmarmergiovensab
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011