top of page
Search
SQL Query AD Distribution Lists Membership
Ever wanted to query your AD from SQL and then list all the members of your Distribution Lists? Because you can’t do it, sheesh, that was easy. There are some limitations in OPENQUERY which means you cannot query multi-value fields from SQL, but you can pull results from a specific Distribution lists. Well funny you should end up here then, because I have just the thing. Something like this would work to get members of a DL SELECT name FROM OPENQUERY( ADSI,'SELECT name, membe

sqldba
Jul 20, 20123 min read
bottom of page

