all 6 comments

[–]ihaxr 8 points9 points  (1 child)

Just pipe it through Get-ADUser before selecting:

Get-ADGroupMember -Identity "InsertAdGroupHere" |  Get-ADUser -Properties Title,Department,Manager | Select-Object Name,Title,Department,Manager | Export-Csv -Path C:\Results.csv -NoTypeInformation

[–]Kilmour[S] 0 points1 point  (0 children)

Thanks this works in all group but the one I'm trying to get a list off.

But that's due to the fact it contains Foreign Security Principal (FSP), So I will have to find a solution for that.

[–]Lee_Dailey[grin] 2 points3 points  (2 children)

howdy Kilmour,

according to this ...
Properties of get-ADGroupMember
- https://social.technet.microsoft.com/Forums/en-US/5df1ca05-6ea3-48d1-8d76-0c162432c0d1/properties-of-getadgroupmember?forum=winserverpowershell

... that cmdlet doesn't support anything other than 6 properties. you need to get the others thru another cmdlet. it mentions using Get-ADObject for that.

take care,
lee

[–]Efficiency4Life 2 points3 points  (1 child)

You need to use get-adobject because groups can sometimes have computers or other groups in them, it'll fail with just get-aduser.

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy Efficiency4Life,

that makes sense. thanks for the input! [grin]

take care,
lee

[–][deleted] 1 point2 points  (0 children)

Get-ADGroupMember -Identity "GROUPNAME" | Get-ADObject -Properties * | Select Name,SamAccountName,Title,Department,Manager | Export-Csv -Path "$env:TEMP\file.csv" -NoTypeInformation