hyperbyte
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use Powershell and refer to links below:
https://www.experts-exchange.com/questions/24407400/Export-members-of-an-Active-Directory-Security-Group-using-PowerShell.html
https://www.experts-exchange.com/questions/24407400/Export-members-of-an-Active-Directory-Security-Group-using-PowerShell.html
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
or the good old dsget:
dsquery group -name myGroupName | dsget group -members
but the first powershell and the last dsget can be recursive, if you want, with -recurse and -expand respectively.
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/
For more info and download, refer below link :
http://www.manageengine.com/products/ad-manager/
ASKER
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"
Get-adgroupmember -identity "name of group" | select name, sAMAccountName | export-csv "c:/security-export.csv"
you have to use
import-module ActiveDirectory
before, as i told you.
:-)
import-module ActiveDirectory
before, as i told you.
:-)
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.
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.
Hi Richard,
He's asking for querying Active Directory groups.
He's asking for querying Active Directory groups.
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