I had a problem with Server 2012R2 automatically logging me out and closing any open applications (thereby losing all in process work product). This bummed me out.
Found this helpful information which describes how to reset the timeout limits:
Use the 'Edit Group Polidy' administrative tool from the start menu (gpedit.msc - which controls Local Security Policy on that single machine).
Navigate through the folder list to the following locations:
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits (configured here for all users)
User Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits (Not configured)
Change the following settings:
Set time limit for disconnected sessions - Enable, set to never
Set time limit for active but idle Remote Desktop Services sessions -- Not configured (may have to also Enable, set to never)
Set time limit for active Remote Desktop Services sessions -- Not configured
End session when time limits are reached -- Disabled
Terminate session when time limits are reached -- Not configured
Other changes that I've been known to need on VM installed 2012r2 OS:
And under the same Remote Desktop Session Host go to the Device and Resource Redirection folder, check that "Allow audio and video playback redirection" is Enabled, as well as making sure that in Administrative Tools->Services that the Windows Audio is both enabled and set to Automatic start.
Used Powershell commands to install >Install-WindowsFeature Desktop-Experience -- reboot, then with gpedit.msc remove Windows Components->Store -- Enable all 'Turn off' features, then under User Configuration->Administrative Templates->Start Menu and Taskbar->Enable 'Do not allow pinning Store app to the Taskbar' and Disable 'Show Windows Store apps on the taskbar'
Lastly, navigate using File Explorer to %ProgramData%\Microsoft\Windows\Start Menu\Programs and remove the shortcuts for both 'Store' and 'PC Settings'
Can't find gpedit.msc? Then try MMC.EXE. Go to File->Add/Remove Snap-In. Click "Group Policy Object Editor" in the left pane, then the "Add ->" button in the center.
In the "Select Group Policy Object" dialog, click the Browse button.
In the "Browse for a Group Policy Object" dialog, enter the name or the IP address of the computer to control.
OK all the way back to the main MMC window. Provided there are no firewall or security issues, you'll be working with the local Group Policy on the target system.