Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

quering active directory with tsql select statement

Status
Not open for further replies.

andyvldmrsky

Programmer
Dec 12, 2008
1
US
dear friends !

could you please help me !

i am trying to get the text stored in the "description" field of a computer properties in active directory.

i use a code like this:

select * from openquery ( ADSI, 'select name, description from ''LDAP:// OU=computers, OU=..., DC=..., DC=com'' where objectcategory = ''computer''' )

i fail because this description field is so called multi-valued as far as i understand it.

so my question is: is there a way to get this text ? there should be - the active directory console itself gets it !

thank you in advance !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top