Thursday, 8 October 2015

Powershell to Enable Remote Desktop Remotely


Below are the Powershell cmdlets to enable Remote Desk top feature on Servers and Client OS.

Enable Remote Desktop:

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



Disable Remote Desktop:

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



Enable secure RDP authentication:


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


Allow incoming RDP on firewall:

Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

No comments:

Post a Comment