Site icon WinCert

Powershell script to list AD Group members with DisplayName

<p>If you have the need to list members of the Active Directory group here&&num;8217&semi;s how you can do it with Powershell&period;<&sol;p>&NewLine;<p>Open Powershell and type&colon;<&sol;p>&NewLine;<p><strong>Get-ADgroupmember -identity &&num;8220&semi;AD group name&&num;8221&semi; &vert; get-aduser -property displayname &vert; select name&comma; displayname<&sol;strong><&sol;p>&NewLine;<p>replace the &&num;8220&semi;<strong>AD group name<&sol;strong>&&num;8221&semi; with the name of your AD group &lpar;without quotation marks&rpar;&period;<&sol;p>&NewLine;<p>The output will be in the format <strong>username &vert; Display name<&sol;strong><&sol;p>&NewLine;<p>If you want the output to be written in a text file you can use the following command&colon;<&sol;p>&NewLine;<p><strong>Get-ADgroupmember -identity &&num;8220&semi;AD group name&&num;8221&semi; &vert; get-aduser -property displayname &vert; select name&comma; displayname &gt&semi;C&colon;&bsol;temp&bsol;result&period;txt<&sol;strong><&sol;p>&NewLine;

Exit mobile version