You can configure Remote Desktop Services (formerly known as Terminal Services) to disconnect and/or end sessions based on timings of your choice. A Microsoft forum entry describes the various settings and options available.
Connect to admin shares on non-domain joined system
Needing to add a non-domain joined Hyper-V host to a Veeam B&R server gave the usual issues with credentials,...