Here are three easy ways to change your RDP port number of an Azure VM.
1. AZURE PORTAL
This is a good way when you don’t want to login to the machine. It does all the manual steps you’d have to think of otherwise.
Go to to Operations section on your VM blade and click on Run Commands
Click on SetRDPPort
In the input form enter the new RDP port number
Read more on my blog: https://www.mattiasdesmet.be/2020/06/01/azure-change-vm-rdp-port-number/