link
Set-Item WSMan:localhostClientTrustedHosts -Value <machine-name or IP Address>
Set-Item WSMan:localhostClientTrustedHosts -Value 192.168.1.50
Enter-PSSession -ComputerName <machine-name or IP Address> -Credential <machine-name or IP Address or localhost>Administrator
Enter-PSSession -ComputerName 192.168.1.50 -Credential 192.168.1.50Administrator
setcomputername <new-name>
shutdown /r /t 0