You are trying to install the RDS role on a Windows 2012 server, but get the error:
Unable to connect to the server by using Windows Powershell Remoting
You need to ensure that Powershell Remoting is enabled and also that it has enough memory to work with.
- Log into the Windows 2012 server.
- Start PS Shell as Administrator (right-click, Run As Administrator).
- Run the commands:
Set-Item WSMan:localhostShellMaxMemoryPerShellMB 1000
- Reboot the server.
This usually resolves the issue.