Hello,
Try to add parameter after logoff, like "logoff someone", because if you are just using "logoff", your admin account/system account will be logged off.
If the Answer is helpful, please click "Accept Answer" and upvote it.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Team,
I have one requirement to mention below. Explanation of requirement : For Windows 10 systems In Meeting and Review Room 1) Multiple users are login to system and forget to log off from system. After sometime user account shows lock and when screen lock it prompts to put username and password for loge din user whose account is lock If some second users come and try to log in it uses screen prompted for previous first user login and due to new user multiple try first user account got lock so can we log off user forcefully if account get lock or in screen lock, if any new user tries to log in, he should log in to system and first user account should get logoff. I tried in one system with local GPO and schedule task but got stuck
################
TRIED METHOD 1 - But Not worked
################ Enable other logon/logoff events success failure this will enable log in security with event id 4800 for account lock schedule task. MUM-Screen-room-policy-logoff on lock Trigger: on an event 4800 Action : start a program Powershell.exe -Execution Policy Bypass -File "C:\IT\logoff.ps1" I can see in history of task that task trigger and Task completed, but I don't see user logoff. ################
TRIED METHOD 2 - But Not worked
################ Created Task Schedular General - MUM-AUTOLOGOFF
Trigger - on Idle - when computer is idle enable
Action - Start a Program - C:\Windows\System32\Shutdown.exe /l
Conditions - start the task only if the computer is idle for - 1 hour
Settings - Allow task to be run on demand
Run task as soon as possible after a scheduled start is missed Not Works: Action: Start a Program: c:\windows\system32\logoff.exe
Even Tried creating bat and PowerShell script with cmd "C:\Windows\System32\Shutdown.exe /l " and "c:\windows\system32\logoff.exe"
Script not getting trigger through task scheduler but in history of task if we see Task started and completed but user login show as its.
Mention cmd to logoff if run through cmd for PowerShell its works and even with scripts if we run manually it works.
Fill some BUG or I am missing some steps while creating this task
Works - But if mention cmd it works in Action: Start a Program: C:\Windows\System32\Shutdown.exe /r /f
Need some suggestion to create task which can log off user if his account get lock and if system is idle for 30 minutes system should automatically log off user from system and all running application forcefully closed
Need Advice if we can do this task through GPO ( Local and domain policy ) and Task Scheduler
Hello,
Try to add parameter after logoff, like "logoff someone", because if you are just using "logoff", your admin account/system account will be logged off.
If the Answer is helpful, please click "Accept Answer" and upvote it.