Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks for your answer, but I want to restrict connections at the other end: the computer that is being connected to should only allow those from a certain ip. Your solution allows the computer initiating the connection to connect.
@Ramhound thanks, I'll give this a try at work tomorrow. I think I must prevent Enable-PsRemoting from opening the firewall for all computers, though, when I first call it, so that the allow rule is enough.
@Ramhound Thank, I've read the answer, and I think I could adapt the IPSec approach (#2). However, I don't want to block all other traffic, but I could probably adapt the solution to block all traffic on the WinRM ports except from my admin computer. However, changing local group policies with MMC isn't going to scale well for 60 computers spread around the building. So, any chances of a command line solution?
@SimonS Isn't this command supposed to configure what remote hosts the admin computer accepts? Or can it also be used to restrict access who can access a host?