WSMan TrustedHosts is a Windows WinRM client concept — does not exist on Linux. Guard the configure+restore blocks with $isLinuxHost so the Prepare scripts run without elevation errors from a Linux host. -SkipCACheck/-SkipCNCheck in sessionOptions is sufficient on Linux.