How do I preserve Enums as 'Strings' in ConvertTo-Json cmdlet?

230 Views Asked by At

ConvertTo-Json cmdlet in PowerShell core has a parameter EnumsAsStrings which allows JSON to have string representations instead of integer for Enums.
There is no such parameter in Windows Powershell. What will be a solution for complex objects for Windows PowerShell without manually casting individual members to their string values?

0

There are 0 best solutions below