Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Report of Groups owned along with group memberships for each group, all in a single .csv file

$
0
0

Hello all,

What I'm trying to do is generate a report of all groups owned by a specific user, along with the group memberships, and output it all to a single .csv file. In the .csv file, I would like to have the group names as the column headers, and underneath the group name, list all the members of the group down through the column. So for example, if User1 owns 3 groups, the output would look like:

What I'm having trouble with is outputting the objects to the .csv using New-Object psobject, and I'm starting to wonder if there is an easier way to do this and my brain is just fried.

Any ideas?


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>