Hello 365keaAdmin
it sounds like you're having a frustrating issue with RDP access to your Azure VM. Since the RDP was working initially and then stopped after a day, there are several potential reasons this can happen. Here are some troubleshooting steps you can try:
- Check if Windows Firewall is blocking RDP
Use Run Command in Azure Portal (this works even when RDP is down):
Portal → VM → Run Command → RunPowerShellScript
Get-NetFirewallRule -DisplayGroup "Remote Desktop"
If rules show Disabled or Block, fix it:
Enable
Set
- Reset the built‑in RDP configuration
netsh advfirewall firewall set rule group="remote desktop" new enable=yes
netsh advfirewall set currentprofile state on
- Reset the NIC inside the VM
ipconfig
ipconfig
ipconfig
Restart the NIC:
Restart-NetAdapter -Name "Ethernet"
- Verify NSG is not auto‑modified
Go to: Portal → NIC → Effective security rules
Check if there is a rule coming from:
- Azure Security Center
- Firewall Manager
- Policy Assignment
If you see unexpected deny rules remove or exclude the policy.****
- Turn off any Security Baseline or GPO applied by Azure AD / Intune
Some baselines disable RDP after first sync.
Check: Portal → Endpoint Manager → Devices → Configuration Profiles
Disable any Windows Security Baseline temporarily.
- Enable Boot Diagnostics Screenshot
Portal → VM → Boot diagnostics
If the screenshot shows: “Network Level Authentication error”, this is related to TLS or certificate trust.
reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
The reason RDP works on the first day but not after 24 hours is because something inside the Windows OS is changing — usually the Windows Firewall or a security policy — which begins blocking port 3389. Since Azure Bastion also fails, the issue is inside the VM and not related to public IP or NSG. We can resolve this by re‑enabling the RDP firewall rules and verifying that no policy or security baseline is disabling RDP after the machine is running
References:
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-connection