Powershell restricts remote host access

I have three windows server 2008 R2; DEV, UAT and Live. I deploy web applications between these servers, including setting up and configuring IIS, as well as backing up and restoring the database through a PowerShell script. I am using a remote powershell session. I would like to prevent any machine, except my deployment machine, from creating a remote powershell session on the host, even if the user is authenticated. Is it possible?

I looked at the PSRemoting documentation in detail and cannot find anything useful.

Thanks in advance

+3
source share
2 answers

, , , , .

http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2008/02/23/remotely-managing-your-server-core-using-winrm-and-winrs.aspx

.

Windows

, :

WinRM set winrm/config/service/auth @{Basic="true"}
WinRM set winrm/config/client @{TrustedHosts="<local>"} 
WinRM set winrm/config/client @{TrustedHosts="RemoteHost"}

RemoteHost - , .

+2

Source: https://habr.com/ru/post/1795911/


All Articles