Setup auto-lock of computer
1. With computer on, press the window key
2. enter the following in the search box: local security policy
3. Press ENTER to open the “Local Security Policy” app
select “SECURITY OPTIONS”
Double mouse click on “Interactive Logon: Machine Inactivity Limit “
The value is in seconds, so if you enter 600 seconds, you are telling the computer to automatically lock itself after 10 minutes of inactivity which basically means 10 minutes with no mouse or keyboard activity.