jan-h
8/7/2015 - 8:12 AM

Enable Windows Remote Desktop Connection with PowerShell

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