Enable RDP from powershell on windows 8/11

To enable remote desktop connections under Windows 8, just start powershell and enter these commands:

Windows 8
(Get-WmiObject win32_TerminalServiceSetting -Namespace root\\cimv2\\TerminalServices).SetAllowTSConnections(1)
import-module netsecurity -ea stop ; Get-NetFirewallRule | ? {$_.displayname -like \"remote desktop*\"} | Set-NetFirewallRule -enabled true
Windows 11
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0 
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

The commands can be ran remotely if you have SSH server installed - like i did :)

Enter your comment:
N​ P᠎ Z L Q
  • windows/client_os/rdp_w8.txt
  • Last modified: 2022-03-14 20:22
  • by tplecko