Dsquery User | Dsget User II

I need to output from AD to excel all my users in this format.

LASTNAME, FIRSTNAME MI ( with the comma after the lastname )

CMILLERAsked:
Who is Participating?
 
vsg375Connect With a Mentor Commented:
Sorry, I added a carriage return. Of course the whole query stands in one line...

dsquery user -name *  | dsget user -ln -fn  > users.txt
0
 
vsg375Commented:
Hi,

Try this :

    dsquery user -name *  | dsget user -ln -fn >
    users.txt

You don't care about the kind of separator, since Excel will be able to deal with it, whether comma, tab or other.

If you absolutely need a comma for presentation purposes, you can add it afterwards in your Excel sheet.

Hope this helps
Cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.