SELECT
sAMAccountName,
userPrincipalName,
Name,
department,
Manager,
title,
mobile,
ipPhone,
mail,
distinguishedName,
streetAddress,
l,
postalCode,
co,
company
FROM
OPENQUERY(ADSI,'<LDAP://servername.local/DC=servername,DC=local>; (objectClass=user);sAMAccountName,Name,Manager,userPrincipalName,title,ipPhone,mail,mobile,department,distinguishedName,streetAddress,l,postalCode,co,company;subtree')
servername like : MyserverName.local (in my scenario my server name follows
serverName.local
No comments:
Post a Comment