Results 1 to 6 of 6

Thread: Cleaning up DSGET group command output

  1. #1
    Join Date
    Oct 2009
    Location
    In the middle of the Ocean
    Posts
    4

    Cleaning up DSGET group command output

    Hey guys,

    I spent the past hour or so learning about the dsquery, and dsget commands to help me export four groups and their members into an excel spreadsheet for review by my superior, and to better save time of editing 8,000 users individually, I was wondering if anybody had any good practices or ideas on how to clean up the output of the dsget group command.

    I can easily export the data into a .csv and open it in Excel, and it reads fine, but my problem is, my superiors expect it to look nice and neat, and having the Distinguished Name on every line, they're going to be reading Chinese.

    So I was wondering if there's a way to clean up the DN's so that when you export from a "dsget group -members" command, you get only user names, or login names, or something not 50 characters long.

    I googled this and I couldn't find anything, so I'm just throwing my question out there to see if anyone has any ideas. Thanks in advance!

  2. #2
    Join Date
    Oct 2005
    Posts
    1,217

    Re: Cleaning up DSGET group command output

    I didnt like the output that the DS tools generated. So, therefore instead of that you can learn joe's Adfind tool that is well written on the joeware website. That has a huge Ad query tool which will let you define attributes that want it to print and pipe to a CSV file. Can you tell us what does your DSget comman look like?

  3. #3
    Join Date
    Oct 2009
    Location
    In the middle of the Ocean
    Posts
    4

    Re: Cleaning up DSGET group command output

    Hey guys, thanks for replying. My command looks like this:

    dsget group "CN=RIVER CITY 1,OU=River City,OU=External Access Groups,DC=cvn68,DC=navy,DC=mil" -members > River City 1.csv

    So it exports just fine into the csv file, and I can open it just fine, it's just cleaning up the DN's that I get for every line. If I only had to do this for 30 users I would be fine, but I have four groups, and each group has around 300-1000 people in it. I'd be at this all day...

    I'll check out Joeware see if I can find any nifty tools on there...

  4. #4
    Join Date
    Oct 2009
    Location
    In the middle of the Ocean
    Posts
    4

    Re: Cleaning up DSGET group command output

    All right, so I downloaded ADFind and it is a mighty fine program. But I cannot seem to find the command to extract the members of a group. I can find a group and everything, and find several more things, but I can't seem to find the right syntax to extract members.

    Also, I do not see an option in here to export to CSV. I see the options to change how the CSV is created, but no default -createcsv command out in plain day. Either I am over-looking a simple command or I am just not typing the right syntax.

    And thirdly, is there an "objectcategory" list I can look at? So far I've just been guessing at what I can put in there.

    Thanks again for all the help.

  5. #5
    Join Date
    Oct 2005
    Posts
    449
    Yes, it might be that those users could be in a different DN paths, that is why DN paths are important.

  6. #6
    Join Date
    Oct 2009
    Location
    In the middle of the Ocean
    Posts
    4

    Re: Cleaning up DSGET group command output

    Yeah, you were right, I was forgetting the quotations around my DN when I put it in Adfind, once I did this and put proper syntax, and used Joe's examples, I was able to export everything in about 5 minutes, and edit the 4 spreadsheets in 10. so I pretty much just did about 2 days worth of monkey punching user names in about 20 minutes. Oh the sweetness of this program.

    Thanks all for the help!

Similar Threads

  1. Replies: 6
    Last Post: 27-05-2011, 10:20 AM
  2. How to save output of ping command
    By Mewad in forum Windows Software
    Replies: 4
    Last Post: 04-01-2011, 11:02 AM
  3. Replies: 2
    Last Post: 28-02-2010, 08:30 PM
  4. ps aux command output of cpu column
    By LinuxeD in forum Operating Systems
    Replies: 3
    Last Post: 01-08-2009, 09:14 PM
  5. Dsget group members SID
    By Jeremy Smith in forum Active Directory
    Replies: 3
    Last Post: 22-11-2008, 06:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,984,714.78469 seconds with 17 queries