I have multiple computers in a LAN and a Windows Server 2012 R2 in another city. They are all in a Wireguard VPN. I can use SMB file shares, PSexec, RDP and such things, but can't make WinRM enter-pssession work because
enter-pssession : Connecting to remote server myserver failed with the
following error message : The WinRM client cannot process the request.
If the authentication scheme is different from Kerberos, or if the
client computer is not joined to a domain, then HTTPS transport must
be used or the destination machine must be added to the TrustedHosts
configuration setting. Use winrm.cmd to configure TrustedHosts. Note
that computers in the TrustedHosts list might not be authenticated.
It says I either needs to set https OR have the trusted hosts set, so I chose the latter, but it still doesn't work even when Windows Firewall is off.
winrm quickconfig has been done, trusted hosts contain the whole Wireguard IP subnet
get-item wsman:\localhost\client\trustedhosts
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String TrustedHosts 192.168.200.*
winrm enumerate winrm/config/listener shows it's listening on the Wireguard NIC ip.
test-wsman command works both ways, so why not enter-pssession?