Powershell Script to export group membership to multiple CSV

Freddie 21 Reputation points
2022-11-14T11:21:54.807+00:00

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.
5,322 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 94,196 Reputation points MVP
    2022-11-14T12:30:13.587+00:00

    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)

    Regards
    Andreas Baumgarten