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.
«dicembre»
domlunmarmergiovensab
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234