PowerShell script to get the list of users in the AD group

Audit Report: List of Users in AD group

To get the list of users added to the AD Group

Open the Powershell as administrator
Type the below script by giving the AD group inside the doubt quotes

Script:
> Get-ADGroupmember -identity "ADUserGroup" |select name,samaccountname |export-csv C:\ADGroupmembers.csv

Output:
Go to the Output Path: C:\ADGroupmembers.csv

Comments