Link to home
Start Free TrialLog in
Avatar of tkthelpdesk
tkthelpdeskFlag for United States of America

asked on

Unlock a pc using group policy

Hello, I have users who lock their computers every night rather than logging off as we have requested. is there a group policy we can apply that says after a certain time of day...say 8:00pm log off anyone still logged in?
Avatar of zalazar
zalazar

There is no direct GPO but it's possible via a scheduled task item which you can create via a GPO.
https://technet.microsoft.com/en-us/library/cc725745.aspx
You can schedule the task to run a program called
"C:\Windows\System32\shutdown.exe"
At the specified time.
With the following parameters
/l /f

This will logoff the user and also close any unsaved work.
If you do not use the "/f" option or use "logoff.exe" any unsaved work will prevent the logoff to succeed.
That will logoff the account that starts the task. So you would have to have to deploy it as a user task, not a computer policy.
ASKER CERTIFIED SOLUTION
Avatar of Venugopal N
Venugopal N
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yep, that's it, exactly.
Avatar of tkthelpdesk

ASKER

Thanks
Indeed as an "User Configuration" GPO
My suggestion was at least in the right direction but anyway...
The article is using logoff.exe and this won't force the logoff if the user has unsaved work as already mentioned.