|
| |||||||||
| Tags: common, extract, group, members |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to extract only common names for members of a group
Hi, I've been trying to extract the usernames for member of a group using this: DSGET GROUP "cn=HER-GBS-DAT-ADM,ou=security groups,ou=groups,ou=locations,dc=domain name,dc=com" -members However this extracts everything including OU and DC for each user. How can I keep it down to just extracting the common name as this is all the info I'm interested in? Thanks, Ronnie |
|
#2
| |||
| |||
| RE: How to extract only common names for members of a group
I was just thinking that it would actually be even better if I could get just the usernames and not the common names. Is this possible? Thanks in advance, Ronnie |
|
#3
| |||
| |||
| RE: How to extract only common names for members of a group
If you want to do this in PowerShell you could do something like this. You will need to install Quest Active Roles to get the QAD snapin http://www.quest.com/powershell/activeroles-server.aspx $UserObject=Get-QADUser -sizelimit 0 foreach ($SamName in $UserObject) { $SamName.samaccountname } "Ronnie" wrote: > > > "Ronnie" wrote: > > > Hi, > > > > I've been trying to extract the usernames for member of a group using this: > > > > DSGET GROUP "cn=HER-GBS-DAT-ADM,ou=security > > groups,ou=groups,ou=locations,dc=domain name,dc=com" -members > > > > However this extracts everything including OU and DC for each user. How can > > I keep it down to just extracting the common name as this is all the info I'm > > interested in? > > > > Thanks, > > Ronnie > > I was just thinking that it would actually be even better if I could get > just the usernames and not the common names. Is this possible? > > Thanks in advance, > Ronnie |
|
#4
| |||
| |||
| Re: How to extract only common names for members of a group
How about running the following from a command prompt, replacing <group name> with the group you are looking for info on net group /domain <group name> -- Paul Bergson MVP - Directory Services MCTS, MCT, MCSE, MCSA, Security+, BS CSci 2008, 2003, 2000 (Early Achiever), NT4 http://www.pbbergs.com 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. "Ronnie" <Ronnie@discussions.microsoft.com> wrote in message news:F86E5082-1F2A-4E73-A1A0-138B00F708D4@microsoft.com... > Hi, > > I've been trying to extract the usernames for member of a group using > this: > > DSGET GROUP "cn=HER-GBS-DAT-ADM,ou=security > groups,ou=groups,ou=locations,dc=domain name,dc=com" -members > > However this extracts everything including OU and DC for each user. How > can > I keep it down to just extracting the common name as this is all the info > I'm > interested in? > > Thanks, > Ronnie |
|
#5
| |||
| |||
| Re: How to extract only common names for members of a group
Thanks, Paul. This does exactly what I weas looking for. Can I export the results into a CSV file somehow? |
|
#6
| |||
| |||
| Re: How to extract only common names for members of a group
You could pipe it to a file > output.txt But it won't be any different then what is on the screen -- Paul Bergson MVP - Directory Services MCTS, MCT, MCSE, MCSA, Security+, BS CSci 2008, 2003, 2000 (Early Achiever), NT4 |
|
#7
| |||
| |||
| Re: How to extract only common names for members of a group
Ok, I already piped it to txt files for each group, but was hoping that I could get it out in another format. Anyway I'm now able to do what I wanted so thanks again. Regards, Ronnie |
|
#8
| |||
| |||
| Re: How to extract only common names for members of a group
Glad to help -- Paul Bergson MVP - Directory Services MCTS, MCT, MCSE, MCSA, Security+, BS CSci 2008, 2003, 2000 (Early Achiever), NT4 |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to extract only common names for members of a group" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Listing members of Group with >1500 members | Umesh Thakur | Windows Server Help | 11 | 1 Week Ago 05:29 AM |
| Display members of a group with more than 1500 members | Simon G | Windows Server Help | 5 | 25-10-2011 01:35 PM |
| Using DSQUERY to get the members of a Group in AD | Bob Randall | Active Directory | 9 | 11-11-2009 10:39 PM |
| Extract members and groups from AD | Rondo | Active Directory | 8 | 16-01-2009 02:44 AM |
| List all the members of a group | Jigjags | Windows Server Help | 1 | 14-02-2008 10:58 PM |