Home > Operation and Maintenance > Windows Operation and Maintenance > Example tutorial on modifying the 3389 remote port in Windows Server

Example tutorial on modifying the 3389 remote port in Windows Server

零下一度
Release: 2017-06-29 15:37:06
Original
2230 people have browsed it

This article mainly introduces the Bat batch code for modifying the 3389 remote port of Windows Server 2008 R2. Friends who need it can refer to it.

The function is to modify the win2008 r2 server remote port to 6637 through batch processing. And added to the firewall


@ ECHO OFF 
color 0A 
ECHO ---------------------------------------------------------------------------- 
ECHO. 
ECHO 版权所有 copyright of 冰川网络
ECHO. 
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ECHO. 

echo REGEDIT4 >c:\windows\reg.reg

echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Tenninal Server] >> c:\windows\reg.reg

echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Tenninal Server\WinStations] >> c:\windows\reg.reg

echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Tenninal Server\WinStations\RDP-Tcp] >> c:\windows\reg.reg 

echo "PortNumber"=dword:00001a11 >> c:\windows\reg.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp] >> c:\windows\reg.reg 

echo "PortNumber"=dword:00001a11 >> c:\windows\reg.reg regedit /s c:\windows\reg.reg 

@echo 修改成功3389端口成功 netsh advfirewall firewall add rule name=6673 dir=in action=allow protocol=TCP localport=6673

@echo 添加防火墙端口成功 
cmd.exe
Copy after login

2017-06-07 Fixed a bug that prevented the modification from being successful.

The above is the detailed content of Example tutorial on modifying the 3389 remote port in Windows Server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template