Now User Session Control again can capture user idle time and can stop unused sessions, the way it was doing for the earlier versions of NAV. Simply open the PowerShell and execute the following two lines of code: The first line # restriction but want to lock your screen after a idle timeout. # press + everytime you leave your desk ). From an ssh session: export DISPLAY=:0 & sudo -u john xprintidle. There are quite a few ways to check when a certain machine was turned on. This process becomes quite complicated and time-consuming when you have to the track logon session time for multiple users. Powershell get user idle time If the idle time is more than 14 minutes, then the powershell script kicks off the shutdown tool.