Solved

Dsquery User | Dsget User II

Posted on 2009-05-11
2
3,299 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now