How to Enable Remote Desktop Connection with PowerShell in 2024

preview_player
Показать описание
This video will guide you through the steps required to enable or disable Remote Desktop using PowerShell. It will also cover any additional required configurations such as opening Firewall ports in order for a successful remote connection. This video also describes the way on how to disable Remote Desktop via Powershell.

To enable Remote Desktop using PowerShell:
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0

How to enable Remote Desktop through your Firewall:
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

How to disable Remote Desktop using PowerShell:
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 1

To disable the remote desktop option using Windows Firewall:
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"

Content:
0:13 Enable RDP using PowerShell
1:03 Enable Remote Desktop through your Firewall
1:40 Disable RDP using PowerShell

#rdp #remotedesktop #windows10 #powershell
Рекомендации по теме
Комментарии
Автор

Thanks man you have saved me from an big escalation 😅

themanustark