Powershell script to list AD Group members with DisplayName
If you have the need to list members of the Active Directory group here’s how you can do it with Powershell.
Open Powershell and type:
Get-ADgroupmember -identity “AD group name” | get-aduser -property displayname | select name, displayname
replace the “AD group name” with the name of your AD group (without quotation marks).
The output will be in the format username | Display name
If you want the output to be written in a text file you can use the following command:
Get-ADgroupmember -identity “AD group name” | get-aduser -property displayname | select name, displayname >C:\temp\result.txt