bannerAds
Global
language language

Product

Doc

Support

Menu 

SiliCloud Help Document Center

search

Popular search terms

How to change Windows Remote Desktop port?

Update time 2023-08-03 15:23  Version v1.0
I want feedback 
Collect My collection

For Windows version:

Windows Server 2022, Windows 10, Windows 8.1, Windows 8, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2008 R2

Software based:

Powershell

Body:

  1. Use this command to query the port number currently used by RDP
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
  1. Through the following commands, you can modify the RDP port number and add firewall accept rules
$portvalue = 33990

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value $portvalue 

New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portvalue 
New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portvalue 

The above is the whole content of this article.

Hope it helps you.

Do you have any suggestions for this document?

Your rating for this document
You can earn up to 7% from Cloud server new purchase -renewal (3%)-upgrade (3%) ,simply click on the affiliate application to become a partner.
AboutWorry-free refund guarantee.

Become a Partner vServer Affiliate marketing

All Rights Reserved ©2024. SICloud® IT (HK) LIMITED | Silicon Cloud™ (Tokyo) LLC (電気通信事業者番号 A-05-20586) |