MMM,

Sorry Chris, I was a bit irritated about Lonkero's replies... You are right about the idle time but In this case "idle" must be a lack of user input..

Quote:


Platform SDK: Task Scheduler

Idle Triggers
An idle trigger is an event-based trigger that is fired a specific amount of time after the computer becomes idle. The computer is considered to be in an idle state when no keyboard or mouse input occurs.





The question is:
Quote:


...We are experiencing large amount of our users are not logging off at the end of their workday, hence bypassing the login script. Is it possible to logoff any lock workstations after x hour of inactivity daily?...





This means you can use task scheduler and idletime. Lets say a workday + 1 hour = idletime. (If idletime < difference between end and beginning workday)


schtasks:
Quote:


Syntax
schtasks /create /tn TaskName /tr TaskRun /sc onidle /i {1 - 999} [/sd StartDate] [/it] [/ru {Domain\]User [/rp Password] | System}] [/s Computer [/u [Domain\]User [/p Password]]]

Remarks
The "on idle" schedule type schedules a task that runs whenever there is no user activity during the time specified by the /i parameter. In the "on idle" schedule type, the /sc onidle parameter and the /i parameter are required. The /sd (start date) is optional and the default is the current date.

Examples
To schedule a task that runs whenever the computer is idle
The following command schedules the MyApp program to run whenever the computer is idle. It uses the required /i parameter to specify that the computer must remain idle for ten minutes before the task starts.

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc onidle /i 10







Edited by Co (2004-01-16 10:33 PM)
_________________________
Co