Easy way to export group list from AD?
Bokeh
Member Posts: 1,636 ■■■■■■■□□□
I have a sales manager who wants a list from two active email groups - sales and off premise sales. There's 50 or more in each group, and I need to get them in a csv file for him. Is there an easy way to export those on the email lists?
Comments
-
OctalDump Member Posts: 1,722Will this solution work?
https://support.microsoft.com/en-us/kb/555365
Or this:
Can I use CSVDE to export the users in a specific group from AD?
Or else there will be a one liner in PowerSHell to do it:
http://pipe2text.com/?page_id=12182017 Goals - Something Cisco, Something Linux, Agile PM -
NetworkNewb Member Posts: 3,298 ■■■■■■■■■□assuming you'll need to use powershell, something like this to export users from a group.
Get-ADGroupMember -identity “Name Of Your Group” -recursive | get-aduser -Properties mail |select name,samaccountname,mail |export-csv -path c:\groupmembers.csv -NoTypeInformation -
knownhero Member Posts: 450NetworkNewb wrote: »assuming you'll need to use powershell, something like this to export users from a group.
Get-ADGroupMember -identity “Name Of Your Group” -recursive | get-aduser -Properties mail |select name,samaccountname,mail |export-csv -path c:\groupmembers.csv -NoTypeInformation
This is your best and quickest way. You could get really fancy and create a hashtable and do your get-adgroup for each Group you list. But you only have two groups so it would only be a learning exercise.70-410 [x] 70-411 [x] 70-462[x] 70-331[x] 70-332[x]
MCSE - SharePoint 2013 :thumbup:
Road map 2017: JavaScript and modern web development -
getafix` Member Posts: 13 ■□□□□□□□□□NetworkNewb wrote: »assuming you'll need to use powershell, something like this to export users from a group.
Get-ADGroupMember -identity “Name Of Your Group” -recursive | get-aduser -Properties mail |select name,samaccountname,mail |export-csv -path c:\groupmembers.csv -NoTypeInformation
Sorry, a bit of a hijack, but is this the type of question you could expect in an exam? -
poolmanjim Member Posts: 285 ■■■□□□□□□□Sorry, a bit of a hijack, but is this the type of question you could expect in an exam?
Possibly but you would more likely see something more like.
You run a Server 2012 forest with Server 2012 domain controllers. The Sales department needs a listing of all users assigned to the GSales group. How would you accomplish the task requiring the least administrative effort?
A. Get-ADGroupMember
B. Get-ADUser
C. dsget group
D. Export the Group Policy2019 Goals: Security+
2020 Goals: 70-744, Azure
Completed: MCSA 2012 (01/2016), MCSE: Cloud Platform and Infrastructure (07/2017), MCSA 2017 (09/2017)
Future Goals: CISSP, CCENT -
getafix` Member Posts: 13 ■□□□□□□□□□poolmanjim wrote: »Possibly but you would more likely see something more like.
You run a Server 2012 forest with Server 2012 domain controllers. The Sales department needs a listing of all users assigned to the GSales group. How would you accomplish the task requiring the least administrative effort?
A. Get-ADGroupMember
B. Get-ADUser
C. dsget group
D. Export the Group Policy
Gotcha - thanks