Require special characters
Exiger des caractères spéciaux
Explanation
Use this policy setting to configure the use of special characters in the PIN. Allowable special characters are: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ .
If you enable this policy setting, Windows requires the user to include at least one special character in their PIN.
If you disable this policy setting, Windows does not allow the user to include special characters in their PIN.
If you do not configure this policy setting, Windows allows, but does not require, special characters in the PIN.
Utilisez ce paramètre de stratégie pour configurer l'utilisation de caractères spéciaux dans le code PIN. Les caractères spéciaux autorisés sont : ! " # $ % & ' ( ) * + , - . / : ; < = >? @ [ \ ] ^ _ ` { | } ~ .
Si vous activez ce paramètre de stratégie, Windows exige de l'utilisateur qu'il utilise au moins un caractère spécial dans son code PIN.
Si vous désactivez ce paramètre de stratégie, Windows ne permet pas à l'utilisateur d'ajouter des caractères spéciaux dans son code PIN.
Si vous ne configurez pas ce paramètre de stratégie, Windows autorise les caractères spéciaux dans le code PIN, mais ne les exige pas.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity- Value name
SpecialCharacters
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 2 |
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_SpecialCharacters
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SpecialCharacters' -Value 1 -Type DWordDisable
# Disable: Passport/MSPassport_SpecialCharacters
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SpecialCharacters' -Value 2 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Passport/MSPassport_SpecialCharacters
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity'
Remove-ItemProperty -Path $k -Name 'SpecialCharacters' -ErrorAction SilentlyContinue