Combine multiple variables for out-gridview

I am taking an AAD group name and getting the Intune Apps, Scripts and Polices/Profiles applied to it. Each of the above (Intune Apps, Scripts and Polices/Profiles) is a different variable that just lists the displayname (of the apps, scripts, etc…). I want to dump all of them to an out-gridview so you see each variables contents in a column. So the first column would be a list of Apps, the second a list of scripts and the 3rd a list of policies. Each variable will have a different number if items depending on the group.
The rows dont really need to match up to anything across the columns as I am just dumping the data in a gridview as is.
I am hoping this is making sense but I just cant wrap my head around to combine them.


I think I understood your requirement but it does not make any sense at all. A GridView or a table is designed to display structured data. If I got it right the data you want to display are completely unrelated to each other.

May I ask what the purpose of this approach is? Why do you want to display them together next to each other and how many elements are there usually?

You understand completely and yes I now agree that a grid view is not ideal in this situation. I just didn’t understand how to explain it or how it would work.

What I am trying to accomplish is to input a group name, then run the commands I have to get the info from Graph that includes the Intune Apps, Scripts and Policies assigned that that group. I have all of that working but each “list” is in its own variable.
I can view all of the info by running it and scrolling down the PS screen but what I was looking for was more of a way to see everything at once, kind of like how a grid view (or excel spreadsheet) would look like but understand that is not going to work in this situation. Something similar to that though. Being able to see the info from left to right as opposed to scrolling down a huge list separated by multiple sections.

Thanks for understanding, sometimes just explaining it can be a challenge.


You may try to use the output formatter

That would at least use the entire width of the console. :man_shrugging:t3: