Relative Content

Tag Archive for arraysjsonpowershell

Powershell Object to json array , mimic a Table/CSV

Given any PS object, that might have different number of properties. I need to create a json array of each property values, where the 1st row, would be the name of each property, and subsequent rows the values for each of them.

Powershell: Create valid json file from object in array

I get all group names and the names of the “managedBy” field from AD. I want that output to export to an valid json file.
But my json isn’t in a valid format, the brackets ([]) and the comma after each item are missing.
Can someone help me with that? What am I missing?