Pulling a list of group members from multiple security group in AD

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Sam Boutros Sam Boutros 4 months, 2 weeks ago.

  • Author
  • #66588
    Profile photo of Random_Factor


    I'm new to PowerShell and have picked up a few bits, but need to some help if possible.

    I've created a list of AD groups, which I need to pull the members of for audit purposes. The groups list is in a txt file, but I don't know how to get powershell to use this list to allow me to pull the members of each group listed and export them to a CSV file.

    I need to include the name of the group and the name of the group member as a minimum.

    If anyone is able to help, I'd really appreciate it.

  • #66594
    Profile photo of Sam Boutros
    Sam Boutros

    To read group names from txt file use Get-Content cmdlet

    To get group members use Get-ADGroupMember cmdlet of the ActiveDirectory PowerShell module..

You must be logged in to reply to this topic.