- For command Get-ADGroupMember, identity has to be the highlight values:
So group@Company portal .com will not work. - As RichMatheisen says, Get-ADGroupMember cannot read those property you want.
- For aduser property, there's no "co", I assume you want "company", correct it to any value as you want:
Please inform me if there's any error:
(Get-ADGroupMember -identity "sg3-11664937739").name |
get-aduser -properties DisplayName,Userprincipalname,title,Office,description,company,personalTitle,DepartmentNumber,employeeNumber|
Select DisplayName,Userprincipalname,title,Office,employeeNumber,description,company,personalTitle,@{N='Departmentnumber';E={$_.Departmentnumber[0]}}|
Export-csv C:\temp\output.csv -Notypeinformation
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.