Enabling Remote Desktop remotely with PowerShell

downloadLast week I was busy building a new lab environment on my Hyper-V environment. My automated installation joined the machine to my LAB environment domain and disable the Windows Firewall. The only thing I forgot to include was enabling Remote Desktop. It was not posible to start a remote registry session, and I did not have my machine running that has the Hyper-V Manager installed.
The solution is to open a remote PowerShell sessie via the ServerManager.

image

Within this remote PowerShell session with my new server, I executed the following commands:

image

Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0

Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1

Now I can open a Remote Desktop connection to my new server.

image

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *