I have an ADSI connection in my SQL Server (2005) and I'm able to query it using openquery. Is there any way to create new accounts (and/or) edit existing ones?
Also, I'd like to have to use openquery to get to the data, but it looks like it's the only solution.
Here's a sample query that I'm using:
SELECT
samaccountname,
department,
mail,
displayName,
employeeid
FROM OPENQUERY( ADSI,
'
SELECT samaccountname, department, mail, displayName, employeeid
FROM ''LDAP://DC=MyDomainName,DC=MyDomainExtension''
WHERE objectCategory = ''Person'' and objectClass= ''user''
'
)
Thanks