IdleAction is a portable app that initiates automatic logoff, shutdown, restart, or PC lock during idle times through the command line.
IdleAction provides a hands-off approach when there is no keyboard and mouse interaction. It permits you to set the duration in which the action will be performed. This app will be useful in a number of situations like shutting down an idle laptop, for instance.
IdleAction is a simple option to perform various power management options without the need for a cumbersome UI.
Here's the command to run IdleAction:
IdleAction -action timeout
List of action parameters:
-shutdown -restart -logoff -lock -custom For the timeout value in seconds.
You can run any program/script by using the -custom parameter. You must add at least one more parameter so that it becomes:
IdleAction -custom timeout "c:test.exe" "param"
Each action in IdleAction is also recorded in the Event Viewer with the source name IdleAction.
You can also use this application via GPO and take advantage of Scheduled Tasks to keep IdleAction active when an action has been performed.