Does anyone know of a tool that will give you a pop up message that tells the users that they have are about to reach their active session time limit.
We have a GPO in place that limits active session to 12 hours
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
The scripting language of your choice and task scheduler (at logon), group policy, or the startup programs group? Something like this, perhaps:
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") Start-Sleep -s 43140 [System.Windows.Forms.MessageBox]::Show("Sessions are limited to twelve hours. You will be logged off in one minute. Please save your work.")
Specify the maximum amount of time that the user's Remote Desktop Services session can be active before the session is automatically disconnected or ended. The user receives a warning two minutes before the Remote Desktop Services session is disconnected or ended, which allows the user to save open files and close programs.
Specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before the session is automatically disconnected or ended. The user receives a warning two minutes before the session is disconnected or ended, which allows the user to press a key or move the mouse to keep the session active.
[EDIT] To fire the event I guess you could measure the active session times every minute and act on those, getting into a pickle with opening a message inside session x but not in session y. Probably solvable and easy, once it has been figured out.
Though a simple and swinging way could be to run a powershell logon script which just starts a background job inside the user session, starts a timer and when released after like 11 hrs 55 mins displays your message of choice.
As I'm away from my computer with just a ipad to make do, I can't test what would be suitable and not. But I would investigate start-job and start-process, along with start-sleep. GUI boxes were never my primary interest in life, but I have noted most GUI things seem to be possible to achieve from powershell. Displaying message boxes seems simple as google shows, but it should be possible to take over the entire screen estate too I guess :-)
[2:nd EDIT] Just saw the answer in my last edit has been suggested. The addition in this post is then just the possibility of a background job to hide the timer window.