Powershell Script to export group membership to multiple CSV

Freddie 21 Reputation points

Currently I have developed a script that exports single group membership to CSV. My requirement is script should take multiple group names from input csv and export membership to multiple output csv based on group name. For an example input file contains 3 groups i.e Group1, Group2, And Group3. Script should generate 3 csv files, 1 for each groups membership.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,888 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 68,291 Reputation points MVP

    Hi @Freddie ,

    maybe this helps to get started: https://learn.microsoft.com/en-us/answers/questions/980667/export-ad-group.html


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten