Solved

Dsquery User | Dsget User II

Posted on 2009-05-11
2
3,332 Views
Last Modified: 2012-05-06
I need to output from AD to excel all my users in this format.

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

0
Comment
Question by:CMILLER
  • 2
2 Comments
 
LVL 9

Expert Comment

by:vsg375
ID: 24360302
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
 
LVL 9

Accepted Solution

by:
vsg375 earned 500 total points
ID: 24360312
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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question