If you are experiencing an issue where your Windows Server goes to sleep after becoming idle for some time, there is a possible quick and easy fix that should do the trick. Follow these steps to resolve the issue:
According to Source: If you have problems with your PC locking or going to sleep, caffeine will keep it awake. It works by simulating a keypress once every 59 seconds.
Please download and install Caffeine on your Windows Server, then open it and double-click (it needs to be like the shown screenshot) which will keep your machine awake and keep it active in the Windows Task Bar / Task Tray.
That's it, this should prevent Windows from locking or going to sleep.
Note: This does not include the Windows Updates Auto-Restart, that's another matter that needs to be handled separately.
Once you complete these steps, test your Windows OS Server if it no longer goes to sleep after becoming idle. However, if you still experience the same issue, please create a ticket, and we will be happy to assist you in applying additional settings and methods and preventing it from happening again.
[ 3 Out of 5 Found Helpful ]
Create a ticket and wait for a support agent to join you very soon.