Open in the explorer

Prefer PIN pairing

Préférer 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/SetPINPreferred

Explanation

This policy applies to Wireless Display connections. This policy changes the preference order of the pairing methods.

When enabled, it makes the connections to prefer a PIN for pairing to Wireless Display devices over the Push Button pairing method.

If this policy setting is disabled or is not configured, by default Push Button pairing is preferred (if allowed by other policies).

French text from Windows 11 26H2

Cette stratégie s'applique aux connexions d'affichage sans fil. Cette stratégie modifie l'ordre de préférence des méthodes de couplage.

Lorsqu'il est activé, les connexions préfèrent un code confidentiel pour le couplage aux périphériques d'affichage sans fil à la méthode de couplage par bouton de commande.

Si ce paramètre de stratégie est désactivé ou s'il n'est pas configuré, le couplage rapide est préféré par défaut (si autorisé par d'autres stratégies).

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WirelessDisplay
Value name
PreferPinBasedPairing
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/SetPINPreferred
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreferPinBasedPairing' -Value 1 -Type DWord

Disable

# Disable: wlansvc/SetPINPreferred
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreferPinBasedPairing' -Value 0 -Type DWord

Revert to "Not configured"

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

Availability