Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » Cleaning up DSGET group command output
Cleaning up DSGET group command output [message #162022] Tue, 13 October 2009 13:11 Go to next message
IT2.Myers.Tyler.400er  is currently offline IT2.Myers.Tyler.400er  United States
Messages: 1
Registered: October 2009
Junior Member
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!


--
IT2 Myers, Tyler
------------------------------------------------------------ ------------
IT2 Myers, Tyler's Profile: http://forums.techarena.in/members/143977.htm
View this thread: http://forums.techarena.in/active-directory/1258063.htm

http://forums.techarena.in
Re: Cleaning up DSGET group command output [message #162024 is a reply to message #162022] Tue, 13 October 2009 14:30 Go to previous messageGo to next message
florian  is currently offline florian  Germany
Messages: 484
Registered: July 2009
Senior Member
Howdie!

IT2 Myers schrieb:
> 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!

Not exactly what you probably want to hear but I've never liked the
output that the DS* tools generated. That's one of the reasons I started
learning joe's ADfind tool (www.joeware.net). It's a _huge_ AD query
tool that lets you define attributes that want it to print and pipe to a
CSV file.

What does your DSget command look like? We could give you some startup
help if you like.

Cheers,
Florian
--
Microsoft MVP - Group Policy
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Re: Cleaning up DSGET group command output [message #162028 is a reply to message #162024] Tue, 13 October 2009 14:52 Go to previous messageGo to next message
Cary Shultz  is currently offline Cary Shultz  United States
Messages: 127
Registered: August 2009
Senior Member
DITTO! I have been using his tools (oldcmp, admod, adfind) forever and
really like everything about them. I was writing a lot of VBS scripts to
find the things that I wanted to know (like, who has VPN access and how is
it controlled) but writing all this crapola over and over and over again was
a waste of time. Use adfind and put in the correct "whatever" and there you
have it.....and, you can use the .csv output to then bring it to an Excel
Spread Sheet (funny how business people like Spread Sheets over text files!
Whoda thunk?)


"Florian Frommherz [MVP]" <florian@frickelsoft.DELETETHIS.net> wrote in
message news:OSxLmQETKHA.4020@TK2MSFTNGP05.phx.gbl...
> Howdie!
>
> IT2 Myers schrieb:
>> 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!
>
> Not exactly what you probably want to hear but I've never liked the output
> that the DS* tools generated. That's one of the reasons I started learning
> joe's ADfind tool (www.joeware.net). It's a _huge_ AD query tool that lets
> you define attributes that want it to print and pipe to a CSV file.
>
> What does your DSget command look like? We could give you some startup
> help if you like.
>
> Cheers,
> Florian
> --
> Microsoft MVP - Group Policy
> eMail: prename [at] frickelsoft [dot] net.
> blog: http://www.frickelsoft.net/blog.
> Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Re: Cleaning up DSGET group command output [message #162029 is a reply to message #162028] Tue, 13 October 2009 15:25 Go to previous messageGo to next message
IT2.Myers.Tyler.400n3  is currently offline IT2.Myers.Tyler.400n3  United States
Messages: 1
Registered: October 2009
Junior Member
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...


--
IT2 Myers, Tyler
------------------------------------------------------------ ------------
IT2 Myers, Tyler's Profile: http://forums.techarena.in/members/143977.htm
View this thread: http://forums.techarena.in/active-directory/1258063.htm

http://forums.techarena.in
Re: Cleaning up DSGET group command output [message #162030 is a reply to message #162029] Tue, 13 October 2009 16:43 Go to previous messageGo to next message
IT2.Myers.Tyler.400pv  is currently offline IT2.Myers.Tyler.400pv  United States
Messages: 1
Registered: October 2009
Junior Member
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.


--
IT2 Myers, Tyler
------------------------------------------------------------ ------------
IT2 Myers, Tyler's Profile: http://forums.techarena.in/members/143977.htm
View this thread: http://forums.techarena.in/active-directory/1258063.htm

http://forums.techarena.in
Re: Cleaning up DSGET group command output [message #162032 is a reply to message #162029] Tue, 13 October 2009 17:25 Go to previous messageGo to next message
Jorge Silva  is currently offline Jorge Silva  Portugal
Messages: 398
Registered: July 2009
Senior Member
Hi
And probably those users are in different DN paths, that's why DN paths are
important.

--
I hope that the information above helps you.
Have a Nice day.
Jorge Silva
MVP Directory Services

Please no e-mails, any questions should be posted in the NewsGroup
This posting is provided "AS IS" with no warranties, and confers no rights.



"IT2 Myers"; "Tyler" <IT2.Myers.Tyler.400n3c@DoNotSpam.com> wrote in message
news:IT2.Myers.Tyler.400n3c@DoNotSpam.com...
>
> 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...
>
>
> --
> IT2 Myers, Tyler
> ------------------------------------------------------------ ------------
> IT2 Myers, Tyler's Profile: http://forums.techarena.in/members/143977.htm
> View this thread: http://forums.techarena.in/active-directory/1258063.htm
>
> http://forums.techarena.in
>
Re: Cleaning up DSGET group command output [message #162036 is a reply to message #162032] Tue, 13 October 2009 18:56 Go to previous message
IT2.Myers.Tyler.400vf  is currently offline IT2.Myers.Tyler.400vf  United States
Messages: 1
Registered: October 2009
Junior Member
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!


--
IT2 Myers, Tyler
------------------------------------------------------------ ------------
IT2 Myers, Tyler's Profile: http://forums.techarena.in/members/143977.htm
View this thread: http://forums.techarena.in/active-directory/1258063.htm

http://forums.techarena.in
Previous Topic:tracking user log on | log off
Next Topic:Multiple DCs more of a hinderance than help
Goto Forum:
  


Current Time: Tue Jan 16 10:42:44 MST 2018

Total time taken to generate the page: 0.03934 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software