RDP port change for all vm at one time

chirag yadav 1 Reputation point
2020-10-17T18:51:09.963+00:00

I want to change my all vms rdp port at one time from 3389 to 3365

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,635 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2020-10-17T19:02:42.977+00:00

    You can use the PowerShell method here.
    http://woshub.com/change-rdp-port-3389-windows/

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  2. Eleven Yu (Shanghai Wicresoft Co,.Ltd.) 10,726 Reputation points Microsoft Vendor
    2020-10-19T02:06:04.41+00:00

    Hi,

    If all your VMs join the same domain, you can use the domain group policy to deploy the registry to change the port.

    The registry to modify the port is as below.

    Change the listening port for Remote Desktop on your computer
    https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/change-listening-port

    Thanks,
    Eleven

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  3. Thameur-BOURBITA 32,641 Reputation points
    2020-10-23T09:04:57.087+00:00

    Hi,

    To change RDP port number , you have to modify the following registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber.
    You can perform the modification manually or use powershell or use Group Policy Preference :

    Computer Configuration -> Preferences -> Windows Settings -> Registry ->select New -> Registry Item
    gpp-new-registry-item.jpg
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-TCP\" -Name PortNumber -Value 3365

    Before you modify the port number , you have to check if the new port is allowed on Windows firewall. Once you complete the port change , you have to reboot the machine to apply all new settings.

    Please don't forget to mark this reply as answer if it help you to fix your issue

    0 comments No comments