• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Unite Innovations

  • Professional Services
    • Advanced Multi-functional Security And Utility Appliance
    • Computer Repair
    • Data Recovery And Disposal
    • I.T. Services
    • Identity And Credit Theft Protection And Monitoring
    • Internet Marketing
    • Managed Cloud Based (VOIP) Phone Service
    • Monitoring And Inventory
    • Online Backup And Storage
  • Posts
  • Locations
    • Loxahatchee, FL Location
  • About Us

PowerShell: How To Export Active Directory Group Members

March 19, 2019 By Unite Innovations

Supervisors, auditors, or service are always asking for a list of users and groups from our clients active directory. The trouble is that natively there’s no export feature or option to export this information in active directory. We absolutely avoid installing software on clients computers whenever possible. Luckily we can accomplished this effectively by using PowerShell .

I’m going to take you step by step on how to use PowerShell to export the groups user list to a .csv file.

1. First run PowerShell as administrator

Run PowerShell as an administrator from a workstation on the network and member of the domain.

2. Load the Active Directory Module

In order to run queries to an AD group using PowerShell you must first load the Active Directory module.

The Active Directory module can be installed using the following 2 methods:

  1. On Windows Server 2008 R2 and above with the AD DS or AD LDS server roles.
  2. Installing RSAT tools.

You can run the following command to check if you have these installed

Get-Module -Listavailable

Check-Active-Directory-Module

If you see the AD module loads then proceed to step 3. If the module doesn’t load install the RSAT tools. Then run the Get-Module -ListAvailable command again.

3. List And Find AD Groups

If you already know the name of the group, then proceed to step 4.

If you’re not sure about the name of the group, you can run the following command to list all groups in Active Directory.

Get-adgroup -filter * | sort name | select Name

GET-AD-list

Here you can see a list of all the groups in the domain. From here on we’ll be using the “HR FULL” group.

4. List The Members Of Group

To get a list of all the members in the “HR FULL” group run the following command.

Get-AdGroupMember -identity "HR Full"

GET-HR-FULL-LIST

Above you can see the command provides more details on the group members

We can filter out the results to just the members names with this command.

Get-AdGroupMember -identity "HR Full" | select name

GET-HR-FULL-LIST-NAMES

Great, so far! Now all we need is to export the list to a .csv.

5. Exporting Group Members To A CSV File

Finally to export the list of group members to a csv file run the following command.

Get-ADGroupMember -identity “HR Full” | select name | Export-csv -path C:\Output\Groupmembers.csv -NoTypeInformation

Note: The path and file name can be anything you want. for this example we used “C:\Output\Groupmembers.csv”.

That’s it!

Always avoid when ever possible installing 3rd party apps on client computers. There are many 3rd party applications that have a GUI and can do the same thing, but its always best to try using what you have at hand.

Click here for another article that may help with PowerShell.

Filed Under: Tutorials

Primary Sidebar

Dade, Broward, Palm Beach Or Jupiter
(305) 523-9118

Let’s work together

Get in touch with us and send some basic info about your project.

Contact Us

Footer

Social

Follow along on social media.

Unite Innovations FaceBook
Unite Innovations Instagram
Unite Innovations YouTube Channel

Navigation

  • About Us
  • Services
  • Locations
  • Professional Services

Loxahatchee Mailing Address

7040 Seminole Pratt Whitney Rd, # 25-83
Loxahatchee, FL 33470
(305) 523-9118
Mo,Tu,We,Th,Fr 9:00 am – 5:00 pm

Copyright © 2025 · Unite Innovations