Export Members of an Active Directory Group To CSV on Server 2008

Hello,

I need to export a list of members that are part of an Active Directory Global Security Group to a CSV file?  How can I do this?  I am running Server 2008 Standard.

Thank you
LVL 1
hyperbyteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ienaxxxCommented:
Use something like:
import-module ActiveDirectory
Get-ADGroupMember Group-Name | select name,SID | Export-Csv c:\myCSV.csv

Open in new window

in powershell
selecting all the details of the user you want separated in columns.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Will SzymkowskiSenior Solution ArchitectCommented:
Use powershell for this...

Get-adgroupmember -identity "name of group" / select name, sAMAccountName / export-csv "c:/security-export.csv"

The forward slashes should be pipe command I don't have this icon on my phone but that should do the trick for you.

Hope this helps
0
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

ienaxxxCommented:
or you can use the good old csvde with an LDAP FILTER

csvde -r "(&(objectClass=User)(memberof=CN=myDesiredGroup,OU=myGroupsOU,OU=myOU,DC=myDOMAIN,DC=local))" -f myCSV.csv

Open in new window

0
ienaxxxCommented:
or the good old dsget:

dsquery group -name myGroupName | dsget group -members

Open in new window

0
ienaxxxCommented:
but the first powershell and the last dsget can be recursive, if you want, with -recurse and -expand respectively.
0
Sushil SonawaneCommented:
You can achieve these through AD manager plus provide by manage engine. It's free for 30 days trail.

For more info and download, refer below link :

http://www.manageengine.com/products/ad-manager/
0
hyperbyteAuthor Commented:
Hi, thanks for the responses.  My powershell knowledge is not very good.  I'm looking for a script I can copy and paste into powershell, replacing "name of group" for my AD Group but I get errors saying Get-adgroupmember is not a recognised as the name of a cmdlet check line 1 character 18.

Get-adgroupmember -identity "name of group" | select name, sAMAccountName | export-csv "c:/security-export.csv"
0
ienaxxxCommented:
you have to use
import-module ActiveDirectory

before, as i told you.
:-)
0
w_richardCommented:
Hi,
 
To identify members of a local group by using a command line, refer to:
 
1. Open Command Prompt.
2. To list members of a group, type: net localgroup "groupname"
 
Note: You must include the quotation marks.
 
For example, export the members of the local group Administrators to a text file named group.txt, refer to:
 
net localgroup “Administrators” > C:\group.txt

Moreover you can have a look at this link..

http://goo.gl/0b0ouA

Thanks.
0
ienaxxxCommented:
Hi Richard,
 He's asking for querying Active Directory groups.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.