Solved

How to export users list from AD security group in csv format?

Posted on 2014-04-14
10
118,835 Views
4 Endorsements
Last Modified: 2016-05-13
Hello there,

I have a AD security group with 500 members. What is the command to export the list in csv format ?

Please advise.

Thanks and Regards
4
Comment
Question by:goprasad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 9

Assisted Solution

by:djsharma
djsharma earned 84 total points
ID: 39998401
Get-Process | Export-Csv c:\scripts\test.txt.

Refer the below link for proper explanation of Using the Export-Csv Cmdlet
http://technet.microsoft.com/en-us/library/ee176825.aspx
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 249 total points
ID: 39998403
If you have PowerShell ad modules installed
Run the below in a PowerShell window
Import-module ac*
Get-ADUser -filter *| Select-Object lastname,firstname,description | Export-Csv c:\Allusers.csv -NoTypeInformation
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 249 total points
ID: 39998406
If no PowerShell modules this should work

csvde -f allusers.csv -r "(&(objectClass=user)(objectCategory=person)"
0
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
LVL 37

Accepted Solution

by:
Mahesh earned 84 total points
ID: 39998414
Try below

Try below

Import-Module ActiveDirectory
Get-ADGroupMember -identity “Name of Group” | select name | Export-csv -path
Import-Module ActiveDirectory
Get-ADGroupMember -identity “Name of Group” | select name | Export-csv -path C:\Output\Groupmembers.csv -NoTypeInformation

Open in new window


Just run powershell commands with elevated command prompt

This will give you exported output of all group members
6
 
LVL 29

Assisted Solution

by:becraig
becraig earned 249 total points
ID: 39998419
I  missed the part about this being for group members :(

Good catch.
0
 

Assisted Solution

by:OomWall
OomWall earned 83 total points
ID: 39998432
Hi
CSVDE

If you want a gui, use a LDAP browser like Softerra

You can also try powershell command Get-ADGroupMember and pipe it to a csv
e.g. Get-ADGroupMember administrators (much less painfull than csvde... and more fun)
0
 

Author Comment

by:goprasad
ID: 40000409
Please advise i have a AD group name Citrix group, where to place this in the command line?

Please advise
0
 

Author Comment

by:goprasad
ID: 40000417
Sorry I got the command working thanks very much.
0
 

Expert Comment

by:rajpalsidhu
ID: 40819336
Just used this command successfully.

Thanks for that.
0
 
LVL 6

Expert Comment

by:Sid_F
ID: 41592733
For anyone else looking up this query without powershell you can use
dsquery group -name "groupname" | dsget group -members >c:\groupmembers.csv
4

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Know what services you can and cannot, should and should not combine on your server.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

751 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