更改计算机上的远程桌面的侦听端口

 
  1. 将以下代码中的3390更为您想要修改的端口,最大为655335;
  2. 将代码在Windows power 中运行。
$portvalue = 3390
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

 

https://learn.microsoft.com/zh-CN/windows-server/remote/remote-desktop-services/clients/change-listening-port

posted @   article  阅读(24)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2021-03-26 适合内网使用的windows远程控制软件(Radmin、DameWare、tightvnc)
2020-03-26 使 windows update 自动安装后,不自动重新启动windows
点击右上角即可分享
微信分享提示