none
Users from multiple groups including the group names export to a csv RRS feed

  • General discussion

  • Hi,
    Have been using PowerShell for a few years and always try to find solutions through the internet books or forums but I am stumped on this one so please help if you can.

    I have a list of 10000+  AD groups containing users and groups
    I want to produce a spreadsheet with the name of the group and the users (direct and indirect) underneath

    Initially I thought no problem just list the groups and pipe get-adprincipalgroupmembership -filter %user% add some selections and then out-gridview and copy to a spreadsheet

    Alas no, all I get is a long list of users with no group header

    I have tried importing a csv but again can't get the format I want from anywhere (looked on here for ages) , even tried to echo the group name with some concat on the spreadsheet but could get the format on to one line

    Any ideas or suggestions of what to read would be most welcome
    Marc

    • Changed type Bill_Stewart Monday, March 12, 2018 9:11 PM
    • Moved by Bill_Stewart Monday, March 12, 2018 9:11 PM Unanswerable drive-by question
    Wednesday, January 31, 2018 5:55 PM

All replies

  • Suggestions of what to read: I would suggest starting with learning PowerShell fundamentals and building up from there. There is a "Learn" link right at the top of this forum.

    If you are hoping that someone will do this for you: Unfortunately we don't have the resources for that, as it would amount to free consulting.

    If this task is critical to your business, I would recommend hiring a consultant or researching software solutions that can get this done for you.


    -- Bill Stewart [Bill_Stewart]

    Wednesday, January 31, 2018 6:19 PM