Skip to content

Instantly share code, notes, and snippets.

@jkullick
Last active December 3, 2022 08:22
Show Gist options
  • Save jkullick/e6f990ed0df7ddd14c2dffcf70e6a623 to your computer and use it in GitHub Desktop.
Save jkullick/e6f990ed0df7ddd14c2dffcf70e6a623 to your computer and use it in GitHub Desktop.
Enable RDP on Windows Server 2012 R2 with Powershell
# Enable RDP
set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0

# Allow RDP in firewall
Set-NetFirewallRule -Name RemoteDesktop-UserMode-In-TCP -Enabled true

# Enable secure RDP authentication
set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1   

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment