Skip to content

Instantly share code, notes, and snippets.

@AhmedSakrr
Forked from jhorsman/enable-rdp.ps1
Created February 24, 2021 13:04
Show Gist options
  • Save AhmedSakrr/7c1702552f04864abc855d5ced0a2ed3 to your computer and use it in GitHub Desktop.
Save AhmedSakrr/7c1702552f04864abc855d5ced0a2ed3 to your computer and use it in GitHub Desktop.
Enable Windows Remote Desktop Connection with PowerShell
# run as administrator
# reboot afterwards
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment