Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Need to get the description of all the nt logins or email id's in the list

Hi,

I need to get the Description of all the Nt logins or email id's in the txt file.

From the ads

regards
Sharath
Avatar of zoofan
zoofan
Flag of United States of America image

you asked for "or" do you need the description and the email address for all users?

zf
Avatar of bsharath

ASKER

zoofan.

I may have the emailid or Nt login in the txt file.It should query any of this and get the description of these users...
What about just querying the entire directory and creating a master list of all users returning,

loginname,description,emailaddress


to a csv file?

zf
and acutally you can add any other attributes you want into the spreadsheet as well.


zf
I have this method but want to just find data which i have as i dout that these details are not correct...
As in the description in the ads i have the Employee id's of the user.This would help me find the data in there
ASKER CERTIFIED SOLUTION
Avatar of Farhan Kazi
Farhan Kazi
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Farhan.This works great for email id's but not for NT logins....
Can you please post what you have inside UserIDs.txt file.
I have this

Bramha.Reddy@plc.com
Kumaresan.Vaiyapuri@.com
sharathr
venuk
Apply following commands and post results.

DSQuery * DomainRoot -Filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=sharathr*))" -Attr description -L

DSQuery * -Filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=venuk*))" -Attr description -L
C:\>DSQuery * DomainRoot -Filter "(&(objectCategory=Person)(objectClass=User)(sA
MAccountName=sharathr*))" -Attr description -L
12879
C:\>DSQuery * -Filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountNam
e=venugopalk*))" -Attr description -L
23133
Above script should work perfectly please check UserIDs.txt for correct user ID's. Enter following data into notepad and save it UserIDs.txt name. While saving this file make sure you have selected 'ANSI' encoding scheme.

venugopalk
Bramha.Reddy@plc.com
Kumaresan.Vaiyapuri@plc.com

Sorry farhan.

I dont know what's going wrong with my machines.Some times it works and some times give error.Henceforth i shall make sure i shall check in many machines and post the results to you.

Thanks
What is the service pack level of these machines? are these machines fully updated? What Antivirus program is installed on them?
OS is windows 2003 with Sp2 and Scanner is Sophos antivirus