Require PIN pairing
Exiger le couplage de code PIN
Explanation
This policy applies to Wireless Display connections. This policy means that the use of a PIN for pairing to Wireless Display devices is required rather than optional.
Conversely it means that Push Button is NOT allowed.
If this policy setting is disabled or is not configured, by default Push Button pairing is allowed (but not necessarily preferred).
Cette stratégie s'applique aux connexions d'affichage sans fil. Cette stratégie signifie que l'utilisation d'un code PIN pour le couplage aux périphériques d'affichage sans fil est nécessaire au lieu de facultatif.
À l'inverse, cela signifie que le bouton de commande n'est pas autorisé.
Si ce paramètre de stratégie est désactivé ou s'il n'est pas configuré, le couplage rapide est autorisé par défaut (mais pas nécessairement préféré).
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WirelessDisplay- Value name
EnforcePinBasedPairing
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
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: wlansvc/SetPINEnforced
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnforcePinBasedPairing' -Value 1 -Type DWordDisable
# Disable: wlansvc/SetPINEnforced
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnforcePinBasedPairing' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": wlansvc/SetPINEnforced
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
Remove-ItemProperty -Path $k -Name 'EnforcePinBasedPairing' -ErrorAction SilentlyContinue