Open in the explorer

Require pin for pairing

Exiger un code confidentiel pour le jumelage

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Connect FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Connexion
Supported on
At least Windows 10 FR: Au minimum Windows 10
ADMX file
WirelessDisplay.admx
Internal name
WirelessDisplay/RequirePinForPairing

Explanation

This policy setting allows you to require a pin for pairing.

If you set this to 'Never', a pin isn't required for pairing.

If you set this to 'First Time', the pairing ceremony for new devices will always require a PIN.

If you set this to 'Always', all pairings will require PIN.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet d'exiger un code PIN pour le couplage.

Si vous définissez cette valeur sur « Never », aucun code PIN n'est requis pour le couplage.

Si vous définissez cette valeur sur « Première fois », la cérémonie de couplage des nouveaux appareils nécessite toujours un code PIN.

Si vous définissez cette valeur sur « Toujours », tous les couplages nécessitent un code PIN.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Connect
Value name
RequirePinForPairing
StateValue written
Enablednot defined in the ADMX (see the options below)
Disablednot defined in the ADMX (see the options below)

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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: WirelessDisplay/RequirePinForPairing
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Connect'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'RequirePinForPairing' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)
# Choose one of the following actions
# Possible options:
#   Never = 0
#   First Time = 1
#   Always = 2
Set-ItemProperty -Path $k -Name 'RequirePinForPairing' -Value 0 -Type DWord

Disable

# Disable: WirelessDisplay/RequirePinForPairing
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Connect'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'RequirePinForPairing' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": WirelessDisplay/RequirePinForPairing
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Connect'
Remove-ItemProperty -Path $k -Name 'RequirePinForPairing' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Choose one of the following actionsChoisir l’une des actions suivantesRequirePinForPairingDropdownDrop-down listenumRequirePinForPairingREG_DWORD
Required · Default choice (UI): #0
LabelValue
NeverREG_DWORD = 0
First TimeREG_DWORD = 1
AlwaysREG_DWORD = 2

Availability