Powershell PS In Case Of
See also SSH.
Overview: for both server and client: enable remote manager on both sides; set the other side as trusted.
On both:
Enable-PSRemoting -SkipNetworkProfileCheck -Force
Set-Item wsman:\localhost\Client\TrustedHosts -value 192.168.1.*
On the client:
Enter-PSSession 192.168.xx.xx -Credential <server_computername>\<username>
Tip:
$Env:COMPUTERNAME # for computername
$Env:USERNAME # for username
[ref]