If you connect remotely to another Windows machine with PowerShell, is it encrypted like ssh?

Solution 1:

PowerShell connection protocol is defined in winrm configuration, you can retrieve it via

winrm get winrm/config

There are two "modes" available: http and https. While http is available "out-of-box", https requires certificate trust to be configured one way or another.

You can find more details here: https://support.microsoft.com/en-us/help/2019527/how-to-configure-winrm-for-https

update: powershell v6 supports ssh transport, but prior versions are limited to http\https

Solution 2:

If using basic authentication, the authentication would not be encrypted unless using HTTPS (tcp/5986).

After authentication, all communication is encrypted with a per-session AES-256 symmetric key regardless if it is HTTP or HTTPS.

https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/winrmsecurity