新闻公告使用手机扫一扫查看
< 返回

windows默认远程3389修改命令

2024-05-25 20:56 作者:xiangenmin 阅读量:398

下面端口自己修改 用powershell执行

$portvalue = 13389

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

重启远程桌面服务

Restart-Service TermService -Force

联系我们
返回顶部