欢迎光临
我们一直在努力

修改windows远程桌面连接端口-批处理

将以下保存为 port.bat 
服务器

——————————

@echo off

color 0a

title  修改Windows 2003/2008远程桌面服务端口号 

echo *******************************************************************

echo * 修改远程端口为33899

echo *******************************************************************

echo 正在修改端口为 33899,请稍候

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" /v PortNumber /t reg_dword /d 33890 /f

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t reg_dword /d 33890 /f

netsh firewall set opmode mode = enable

netsh firewall set portopening all 80 web enable 

netsh firewall set portopening all 3389 remote-pre enable 

netsh firewall set portopening all 33890 remote enable 

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 1 /f

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 0 /f

echo 正在自动重新启动电脑以便端口生效!

shutdown -r -t 1

pause

exit

———————————–

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。