This is another annoying setting in Windows 2008 R2, especially when a virtual machine is used for development. To deactivate the automatic logoff of a disconnected session in Windows Server 2008 R2…
- Go to Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration
- Select top left node (RD Session Host Configuration)
- In the middle window, right-click on RDP-Tcp and click Properties
- On the Sessions tab, change the End a disconnected session to the wanted value.