Script to Lock computer after idle for x minutes
I haven't worked with batch files in a longtime so I'm hoping to get some help from the community.
I have a batch script that needs to execute something after the computer has been idle for x minutes I just can't figure out how to tell if the computer isn't being used.
*Note - These computers aren't on my domain.
I have a batch script that needs to execute something after the computer has been idle for x minutes I just can't figure out how to tell if the computer isn't being used.
*Note - These computers aren't on my domain.
Comments
-
ptilsen Member Posts: 2,835 ■■■■■■■■■■Task scheduler will detect the idle state and trigger an action on it. If you need an additional arbitrary wait time to execute something, use the timeout command.
-
apr911 Member Posts: 380 ■■■■□□□□□□What exactly are you trying to do? Your topic title suggests you are trying to lock a computer after being idle which, even if the computers are not on a domain, can be down via the GPO on the local machine. A domain just allows for centralized management of the GPO and GPO enforcement but there is nothing wrong with deploying a GPO to non-domain computers. Just be aware admin users on the local machine can modify the GPO settings themselves.
If you're trying to do something else when the computer is idle, well I guess that depends on what you are trying to do because there are varying levels of "idle"Currently Working On: Openstack
2020 Goals: AWS/Azure/GCP Certifications, F5 CSE Cloud, SCRUM, CISSP-ISSMP -
Qord Member Posts: 632 ■■■■□□□□□□