gl_3n2k3
asked on
Extract Users from AD
I can use the csvde command to extract users. I want to extract users based on company name. For example, users have "company name" is the description of their account so I want to extract all users' names with that description. Is this possible. Thanks in advance.
This is an effort to get user counts for different companies. Thanks.
This is an effort to get user counts for different companies. Thanks.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
well it really dends on what your wanting to do with it...your command line it not going to give you an object count and if your quierys are large you have to deal with the buffer limits (youll have to modify this) in your dos window...and if you want to modify those objects its best to use the LDAP query in your AD users and computers.
so dont be dolling out the points just yet...hehe
so dont be dolling out the points just yet...hehe
tmack:
> .... I want to extract users based on company name.....Is this possible...
yes it is possible, with "dsquery".
Perhaps you could direct the output to a file so you dont have to fix the DO$-box buffers etc... ;-)
Seriously, you could do this with a vbs -script or even with asp-page and vb-script but it is much harder. I cannot see the benefits of sripting in this case because job can be done with the tools at hand...
> .... I want to extract users based on company name.....Is this possible...
yes it is possible, with "dsquery".
Perhaps you could direct the output to a file so you dont have to fix the DO$-box buffers etc... ;-)
Seriously, you could do this with a vbs -script or even with asp-page and vb-script but it is much harder. I cannot see the benefits of sripting in this case because job can be done with the tools at hand...
Yea I know you can do this with DSquery..but I was under the impression he was wanting to count them and I dont think the DSquery tool will give you a count of the objects returned does it?.....anyway, I just hate command line stuff......I know, I do things at the command line all day long but hate it...hehe
I just personally like the query tool in the ADUC MMC...just personal prefernce I guess...
I just personally like the query tool in the ADUC MMC...just personal prefernce I guess...
Well, you can search the AD with the ADUC MMC and set some advanced options but exporting the list to a file is impossible and the only place where the count of users is shown is the bottom-left corner of the Find -window.
actually if you use the new tool for 2003 it has a query option at the top and it will show total objects queried and it will export that data to a text file as well. and from there you can import it into excel...I use it all the time....
You can still use the find....but this is an LDAP query that will query the whole AD if you chose it to based on the field you select...very powerful tool..
You can still use the find....but this is an LDAP query that will query the whole AD if you chose it to based on the field you select...very powerful tool..
ASKER
Thanks for the input. I did indeed want two thing - the extracted data and a "count". So I can split the points. The LDAP query provides a count and dsquery can output to file. Thats it. Thanks!
just an FYI there is an export function for that LDAP feature(its in the tool bar)...glad we was of some help!! :-)
check the commands "dsget" and "dsquery" from command line.
I dont remember the right syntax for those commands but each has a very good command line help.
Points go to oBdA.