Policy
Set action to take when logon hours expire
Windows 11 25H2
Policy overview
Key metadata and intent for this policy.
Supported OS tags: Windows10, Windows10RT, Windows11, Windows7, Windows8, Windows81, WindowsRT, WindowsRT81, WindowsServer2008, WindowsServer2012, WindowsServer2012R2, WindowsServer2016, WindowsVista
This policy controls which action will be taken when the logon hours expire for the logged on user. The actions include lock the workstation, disconnect the user, or log the user off completely. If you choose to lock or disconnect a session, the user cannot unlock the session or reconnect except during permitted logon hours. If you choose to log off a user, the user cannot log on again except during permitted logon hours. If you choose to log off a user, the user might lose unsaved data. If you enable this setting, the system will perform the action you specify when the user’s logon hours expire. If you disable or do not configure this setting, the system takes no action when the user’s logon hours expire. The user can continue the existing session, but cannot log on to a new session. Note: If you configure this setting, you might want to examine and appropriately configure the “Remove logon hours expiration warnings” setting
Registry values
How enabled and disabled states update the registry.
No explicit registry values are set for enabled or disabled states.
Policy elements
Inputs and configuration options exposed by this policy.
| Element | Type | Registry mapping | Constraints & behavior |
|---|---|---|---|
Set action to take when logon hours expire ID LogonHoursPolicyDescription | enum | HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\LogonHoursAction Type REG_DWORD | Options: Lock (1), Disconnect (2), Logoff (3) |
Other policies in this category
Explore related policies at the same level.
- ComputerConfigure the mode of automatically signing in and locking last interactive user after a restart or cold bootAt least Windows 10 Version 1903
- ComputerConfigure the transmission of the user's password in the content of MPR notifications sent by winlogon.At least Windows 10 Version 1903
- ComputerDisable or enable software Secure Attention SequenceAt least Windows Vista
- ComputerDisplay information about previous logons during user logonAt least Windows Vista
- UserRemove logon hours expiration warningsAt least Windows Vista
- ComputerReport when logon server was not available during user logonAt least Windows Vista
- UserReport when logon server was not available during user logonAt least Windows Vista
- ComputerSign-in and lock last interactive user automatically after a restartAt least Windows 10 Version 1903