Open in the explorer

Post-authentication actions

Actions de post-authentification

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › LAPS FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › LAPS
Supported on
At least Microsoft Windows 10 or later FR: Au moins Microsoft Windows 10 ou version ultérieure
ADMX file
LAPS.admx
Internal name
LAPS/LAPS_PostAuthenticationActions

Explanation

This policy configures post-authentication actions which will be executed after detecting an authentication by the managed account.

Grace period: specifies the amount of time (in hours) to wait after an authentication before executing the specified post-authentication actions.

If this setting is enabled and greater than zero, the specified post-authentication actions will be executed upon expiration of the grace period.

If this setting is disabled or not configured, the specified post-authentication actions will be executed after a default 24 hour grace period.

If this setting is equal to zero, no post-authentication actions will be executed.

Actions: specifies the actions to take upon expiration of the grace period.

Reset password: upon expiration of the grace period, the managed account password is reset.

Reset the password and logoff the managed account: upon expiration of the grace period, the managed account password is reset and any interactive logon sessions using the managed account are logged off.

Reset the password and reboot: upon expiration of the grace period, the managed account password is reset and the managed device is rebooted.

Reset the password, logoff the managed account, and terminate any remaining processes: upon expiration of the grace period, the managed account password is reset, any interactive logon sessions using the managed account are logged off, and any remaining processes are terminated.

(NOTE: after any interactive logon sessions are terminated there may still be other authenticated sessions in use by the managed account. The only robust way to ensure that the previous password is longer in use is to reboot the device.)

If this setting is disabled or not configured, post-authentication actions will default to "Reset the password and logoff the managed account".

Note: the DSRM account on domain controllers cannot be configured for post-authentication actions. This policy has no effect on domain controllers and will be ignored even if configured for a DC.

See https://go.microsoft.com/fwlink/?linkid=2188435 for more information.

French text from Windows 11 26H2

Cette politique configure les actions post-authentification qui seront exécutées après la détection d'une authentification par le compte géré.

Délai de grâce : spécifie le temps (en heures) à attendre après une authentification avant d'exécuter les actions de post-authentification spécifiées.

Si ce paramètre est activé et supérieur à zéro, les actions de post-authentification spécifiées seront exécutées à l'expiration du délai de grâce.

Si ce paramètre est désactivé ou n'est pas configuré, les actions de post-authentification spécifiées seront exécutées après un délai de grâce de 24 heures par défaut.

Si ce paramètre est égal à zéro, aucune action de post-authentification ne sera exécutée.

Actions : spécifie les actions à entreprendre à l'expiration du délai de grâce.

Réinitialiser le mot de passe : à l'expiration du délai de grâce, le mot de passe du compte géré est réinitialisé.

Réinitialiser le mot de passe et déconnecter le compte géré : à l'expiration du délai de grâce, le mot de passe du compte géré est réinitialisé et toutes les sessions de connexion interactives utilisant le compte géré sont déconnectées.

Réinitialiser le mot de passe et redémarrer : à l'expiration du délai de grâce, le mot de passe du compte géré est réinitialisé et l'appareil géré est redémarré.

Réinitialiser le mot de passe, déconnecter le compte géré et terminer tous les processus restants : à l'expiration du délai de grâce, le mot de passe du compte géré est réinitialisé, toutes les sessions de connexion interactives utilisant le compte géré sont déconnectées et tous les processus restants sont terminés.

(REMARQUE : une fois les sessions de connexion interactives terminées, il se peut que d'autres sessions authentifiées soient encore utilisées par le compte géré. La seule façon de s'assurer que le mot de passe précédent n'est plus utilisé est de redémarrer l'appareil).

Si ce paramètre est désactivé ou n'est pas configuré, les actions post-authentification seront par défaut "Réinitialiser le mot de passe et déconnecter le compte géré".

Remarque : le compte DSRM sur les contrôleurs de domaine ne peut pas être configuré pour les actions de post-authentification. Cette stratégie n'a aucun effet sur les contrôleurs de domaine et sera ignorée même si elle est configurée pour un DC.

Voir https://go.microsoft.com/fwlink/?linkid=2188435 pour plus d'informations.

Use cases

Defines what happens after the LAPS password is used: password reset, session sign-out, or even a reboot, after a delay of 0 to 24 hours (24 by default). It limits how long a password retrieved by support remains valid.

Action 5 reboots the device (risk of data loss) and action 11 also terminates the account's processes (Windows 11 24H2 or Server 2025). A delay of 0 disables all actions.

Microsoft source: Configure policy settings for Windows LAPS

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: LAPS/LAPS_PostAuthenticationActions
$k = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Grace period (hours)
Set-ItemProperty -Path $k -Name 'PostAuthenticationResetDelay' -Value 24 -Type DWord  # between 0 and 24
# Actions
# Possible options:
#   Disabled - take no actions = 0
#   Reset the password = 1
#   Reset the password and logoff the managed account = 3
#   Reset the password and reboot the device = 5
#   Reset the password, logoff the managed account, and terminate any remaining processes = 11
Set-ItemProperty -Path $k -Name 'PostAuthenticationActions' -Value 3 -Type DWord

Disable

# Disable: LAPS/LAPS_PostAuthenticationActions
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": LAPS/LAPS_PostAuthenticationActions
$k = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS'
Remove-ItemProperty -Path $k -Name 'PostAuthenticationResetDelay' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'PostAuthenticationActions' -ErrorAction SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Grace period (hours):Période de grâce (jours) :LAPS_PostAuthenticationResetDelay_INTNumeric boxdecimalPostAuthenticationResetDelayREG_DWORD
Min: 0 · Max: 24 · Default (UI): 24
Actions:Actions :LAPS_PostAuthenticationActionsDrop-down listenumPostAuthenticationActionsREG_DWORD
Default choice (UI): #2
LabelValue
Disabled - take no actionsREG_DWORD = 0
Reset the passwordREG_DWORD = 1
Reset the password and logoff the managed accountREG_DWORD = 3
Reset the password and reboot the deviceREG_DWORD = 5
Reset the password, logoff the managed account, and terminate any remaining processesREG_DWORD = 11

Availability

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

✓ 2025— 2022— 2016