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.
«novembre»
domlunmarmergiovensab
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567