bannerAds
Global
language language

Product

Doc

Support

Menu 

SiliCloud Help Document Center

search

Popular search terms

Windows リモート デスクトップのポートを変更するにはどうすればよいですか?

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

Windows版の場合:

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

ソフトウェアベース:

Powershell

本文:

  1. このコマンドを使用して、RDP が現在使用しているポート番号を照会します。
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
  1. 次のコマンドを使用して、RDP ポート番号を変更し、ファイアウォール受け入れルールを追加できます。
$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 

以上がこの記事の全内容です。

お役に立つことを願っています。

Do you have any suggestions for this document?

Your rating for this document