Hi all!
In an attempt to solve a problem with “round-tripping” JSON I’ve concluded that the only fix is to use PowerShell 7 since the ConvertTo-Json cmdlet in version 7 allows me to escape the troublesome characters.
This solution might just be me robbing Peter to pay Paul though as I now face the issue of getting Calm to use PowerShell 7 instead of the default 5.1 (a.k.a. Windows PowerShell).
I’ve gone so far to set the default PowerShell remote endpoint (windows.powershell) to point to PSH 7, which works if I do a traditional Enter-PSSession but not if I execute a PowerShell script in a Calm runbook.
Which leads up to the title of this topic, how does Calm execute PowerShell on an endpoint?
Since it’s using port 5985 it should be WinRM/WSMAN/remote PowerShell, but it completely ignores the fact that the default PSH remote endpoint is pointing to PSH 7.
Is it using another endpoint? Or is it not using WinRM after all?