Client side TrustedHosts
allows you to connect to remote machines whose identities can't be verified either through domain membership or SSL
certification. Since it's impossible to know if the endpoint is friendly or hostile, the security model requires you to vouch for it by taking an explicit step.
Your question wasn't clear about running commands remotely, so I'll touch on a few topics.
This has little to do with whether you can run scripts hosted on a remote share - that's execution policy.
Likewise, with a knowable host via domain or https you don't need to set the TrustedHosts
to run commands in a remote context.
TrustedHosts
is just about making the connection in the first place.
Think very hard about your stated goal that you want to allow remote connections into compromised systems. You start opening yourself to pass impersonation attacks. If you know a system is compromised, you should be very wary.
Additional info:
Managing Non-Domain Computers
When you make a connection, by default, remoting delegates your logon
credentials to the remote computer. The remote computer uses those
credentials to impersonate you, executing the commands on your behalf.
As you can imagine, there are security risks involved when delegating
your credentials to a remote server. For instance, if a malicious user
was able to successfully impersonate a known remote computer, you
could possibly turn in your credentials to that impostor, who could
use them against you and other people in the network
http://resources.intenseschool.com/remote-management-with-powershell-part-2/