Open in the explorer

Require PIN pairing

Exiger le couplage de code PIN

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Wireless Display FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Affichage sans fil
Supported on
At least Windows Server 2016, Windows 10 FR: Au moins Windows Server 2016, Windows 10
ADMX file
wlansvc.admx
Internal name
wlansvc/SetPINEnforced

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).

French text from Windows 11 26H2

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
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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 DWord

Disable

# 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 DWord

Revert to "Not configured"

# Revert to "Not configured": wlansvc/SetPINEnforced
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
Remove-ItemProperty -Path $k -Name 'EnforcePinBasedPairing' -ErrorAction SilentlyContinue

Availability