I am trying to configure remote control of multiple machines. I can successfully execute commands on a remote computer from my computer, but I do not want anyone to be able to do this.
I tried installing trusted hosts on the remote computer and restarted the service, but it seems to be doing nothing.
For example, on a remote computer:
winrm set winrm/config/client '@{TrustedHosts="someIncorrectName"}'
Then restart the winrm service.
Why can I still run remote commands from my laptop? Should you prevent the execution of a command?
I run the command as follows:
Invoke-Command -cn remoteMachine -Credential $cred -scriptblock {get-process}
Where $ cred was created using get-credential domain / username.
TrustedHosts, , , , . , , , , " ". , , .
MSDN : " , ". , ( , ).
?