On Windows machines, the default RDP (Remote Desktop Protocol) port that comes with the default is 3389. If you want to change this port, which comes by default for any reason, especially security, you can change it by following the steps below. The same steps apply to all windows servers.
First, run the regedit application by pressing the Windows + R key or Search.
In the window that opens, go to the regedit record shown in the kernel below.
And after you enter a port number you want PortNumber value, say OK and exit, after restarting the server, everything is ok, the RDP port will now be a different port than the default port.
In this article, we have learned how to change the RDP port in the windows server.
I hope it has been a useful article.