prevent windows 10 from going to sleep while no user is logged in

Solution 1:

Now what I see is that the server just sleeps/hibernates when no one is logged in even when the powerplan says never go to sleep as administrator.

Log in as the "user" and set the Power Plan. You should restart the computer after this.

Now log off and the Power Plan settings should stick. This works for me on customer computers - I sign out and the next day, move the mouse and the screen lights up (to be clear, the computer had not suspended).

I use the Windows 10 Settings to set this capability.

Windows 10 Never Sleep