When a Windows Virtual Machine is not responding or cannot be reached at all, we can run various commands in the Azure Portal.
1. Verify if Terminal Services are running using the following command,
reg query “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections
If the result returned 1, turn on the service with the following command
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t REG_DWORD /d 0 /f
1. Use the command, netstat -aon | findstr /i “3389” to confirm that port 3389 is listening.
2. Confirm all RDP-related services are running correctly with the following command,
Get-Service -Name TermService, SessionEnv, UmRdpService | Select-Object -Property Name, Status
1. Turn off the internal Windows Firewall using the command below. This command requires a reboot to apply.
reg add hklm\system\currentcontrolset\services\mpssvc /t reg_dword /v start /d 4 /f
After turning off the firewall, we can use Get-Service -Name mpssvc | Select-Object -Property Status to confirm the firewall is turned off
1. Try using the built in disableNLA script in the runcommand page and use reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp” /v UserAuthentication /t REG_DWORD /d 0 to check if the NLA is indeed turned off.
Read Previous Articel: Setup Office 365 Scan to Email on a Printer