溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

修改windows遠程桌面連接端口-批處理

發(fā)布時間:2020-08-08 17:22:04 來源:ITPUB博客 閱讀:271 作者:xikunyun 欄目:服務器

將以下保存為 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

-----------------------------------

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI