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--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to change my all vms rdp port at one time from 3389 to 3365
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--
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.
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
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