Expiration
Expiration
Explanation
This setting specifies the period of time (in days) that a PIN can be used before the system requires the user to change it. The PIN can be set to expire after any number of days between 1 and 730, or PINs can be set to never expire if the policy is set to 0.
Default: 0.
Ce paramètre spécifie la période de temps (en jours) pendant laquelle un code confidentiel peut être utilisée avant que le système ne demande à l'utilisateur de le changer. Le code confidentiel peut être défini pour expirer après un nombre de jours entre 1 et 730 ou des codes confidentiels peuvent être définis pour ne jamais expirer si la stratégie est définie à 0.
Par défaut : 0.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity- 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: Passport/MSPassport_PINExpiration
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# PIN Expiration
Set-ItemProperty -Path $k -Name 'Expiration' -Value 0 -Type DWord # between 0 and 730Disable
# Disable: Passport/MSPassport_PINExpiration
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Passport/MSPassport_PINExpiration
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity'
Remove-ItemProperty -Path $k -Name 'Expiration' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| PIN ExpirationExpiration du code PINMSPassport_PINExpirationDataType | Numeric boxdecimal | Expiration | REG_DWORD | Min: 0 · Max: 730 |