Prefer PIN pairing
Préférer le couplage de code PIN
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).
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
| 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/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 DWordDisable
# 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 DWordRevert to "Not configured"
# Revert to "Not configured": wlansvc/SetPINPreferred
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WirelessDisplay'
Remove-ItemProperty -Path $k -Name 'PreferPinBasedPairing' -ErrorAction SilentlyContinue