How to generate a report on Active Directory group membership

Monitoring group memberships help administrators detect unauthorized addition of users in a group. This will in turn help protect critical company data from falling into the wrong hands.Therefore it is essential for administrators to monitor group memberships continuously.

This article compares the methods of retrieving group membership information using Windows PowerShell and ADManager Plus, a comprehensive Active Directory management solution.

Using Windows PowerShell

  • Identify the domain you need the report from.
  • Determine the attributes you need. For example, the Distinguished Name(DN), SamAccountName and so on.
  • Find the DC that contains the relevant information.
  • Write the code. A sample has been included at the end of this section.
  • Compile the script.
  • Execute it in PowerShell.
  • You can add the Export command to export the report in the format you choose.
  • To obtain the script in a different format, modify the script accordingly.

Sample Windows PowerShell script

Get-ADGroupMember -identity “Domain Controllers” | select name | Export-csv -path C:OutputGroupmembers.csv -NoTypeInformation
 Copied
Click to copy entire script

Using ADManager Plus

  • In ADManager Plus console, go to Reports>Group Reports>Group Members.
  • Find the relevant domain and OU.
  • Click Export to export the report in the different formats available (CSV, PDF. HTML, CSVDE, XLSX)

Screenshot:

powershell-get-ad-user-group-membership-1

The downsides of using Windows PowerShell to get data about group membership:

  • PowerShell scripts can be executed only from the computers which have Active Directory Domain Services role.
  • Applying filters would increase the complexity of the script.
  • To export the report in other formats, the script will have to be modified.

On the other hand, ADManager Plus gets you the required details with just a few clicks. Also, this solution helps administrators manage the network and keep it secure by generating reports on all AD objects. It can also help the administrators automate several routine tasks such as user creation, password management and so on.

  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link