So it turns if you like using Here strings in PowerShell you will run in to dramas with using the Scripts section, the assumption is its breaking however VMware parses the string to convert.
So if you are writing some JSON code to parse to an API you can just do it like this instead:
$Body=@{ DeviceFriendlyName = "Bob" SomeOtherAttribute = "Two" EvenMoarAttributes = "Three" } $Payload= $Body | ConvertTo-Json
I’m sure there are other workaround for differing scenarios, I’ll update this as I come across them.