Search code examples
powershellpowershell-remoting

Powershell restrict Remote access on Host


I have three windows 2008 R2 servers; DEV, UAT and Live. I am deploying web apps between these servers, including IIS setup and config and database backup and restore via a PowerShell script. I use a powershell remote session. I would like to prevent any machine, other than my deployment machine, from creating a powershell remote session on the host, even if the user is authenticated. Is this possible?

I have looked extensively through the PSRemoting documentation and can't find anything helpful.

Thanks in advance


Solution

  • You can also use certificate-based authentication.

    http://blogs.msdn.com/b/wmi/archive/2009/03/23/how-to-use-wsman-config-provider-for-certificate-authentication.aspx

    If you only want your computer to be able to connect, install the certificate on your computer and don't give it to anyone else.