Related Posts Plugin for WordPress, Blogger...

功能說明

此 VBScript 程式功能為修改遠端桌面連線登入 (Terminal Service) 預設 Port Number(3389),下列 VBScript 將遠端桌面連線登入 Port Number 改為 16888

實作環境


TSPortNumberChanged.vbs 內容

Dim Path
Path1="HKLM\SYSTEM\CurrentControlSet\Control\Terminal  Server\Wds\rdpwd\Tds\tcp\"
Path2="HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\"
Set ws=WScript.CreateObject("WScript.Shell")
ws.RegWrite Path1&"PortNumber",16888,"REG_DWORD"
ws.RegWrite Path2&"PortNumber",16888,"REG_DWORD"
文章標籤: