Unexpected ConvertTo-Json results? Answer: it has a default -Depth of 2

Answer ConvertTo-Json has a -Depth parameter: Specifies how many levels of contained objects are included in the JSON representation. The default value is 2. Example To do a full round-trip with a JSON file you need to increase the -Depth for the ConvertTo-Json cmdlet: $Json | ConvertFrom-Json | ConvertTo-Json -Depth 9 TL;DR Probably because ConvertTo-Json … Read more