I supplement the information given above:
In Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections
- the "Restrict Remote Desktop Services users to a single Remote Desktop Services session" item is Disabled
- the "UserSessionLimit" item is enabled and set to 999999
In Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits
- the "Set time limit for disconnected session" item is enabled and set to 2 hours
- the "Set time limit for active but idle Remote Desktop Services sessions" item is enabled and set to 2 hours
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\MaxInstanceCount is set to a value of 0xffffffff (the maximum value possible). I've tried also with the default value (not configured).
On the Azure VM I've not lunched "query session" but I've lunched "qwinsta show" which should provide equivalent information. Right?
I remember that before launching the backup and then restoring to the cloud, I performed a reboot (shutdown -r -f -t 0) precisely to close any connections that might be idle or inactive.
I tried connecting with “mstsc /admin” and also with Azure Bastion but with the usual problem.
Thank you.