Welcome to the Microsoft Q&A Platform and thank you for posting your question!
Based on your description, I would like to provide some guidance to help you troubleshoot the Remote Desktop (RDP) connectivity issue you are experiencing with your Azure virtual machine (VM).
If your VM is running and reachable (e.g., you can ping it), but you are unable to connect via RDP, please kindly following these steps below:
1. Test RDP Port Connectivity
On your local machine, use PowerShell to check whether TCP port 3389 is open to your VM:
Test-NetConnection <VM IP or DNS> -Port 3389
- If TcpTestSucceeded : True – The port is open, which means the issue may be related to the RDP service or authentication settings.
- If TcpTestSucceeded : False – The port is blocked. You should check:
- Network Security Group (NSG) rules
- Windows Firewall settings on the VM
- Public IP address configuration
- Windows Firewall settings on the VM
- Network Security Group (NSG) rules
2. Use Azure Run Command to Repair RDP
In the Azure Portal:
- Navigate to your virtual machine.
- Select Run command from the menu.
- Execute the following scripts:
SetRDPPort – Resets the Remote Desktop port configuration.
ResetRDPCert – Restores the default RDP authentication settings.
These steps should help restore your RDP access. If you continue to experience issues, feel free to provide more details so I can assist further.
I hope this information can help you to finish it successfully. Wish you have a pleasant day!