Open in the explorer

Alternative Port Mappings

Mappages de ports de remplacement

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Lanman Workstation FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Station de travail LANMAN
Supported on
At least Windows Server 2025, Windows 11 FR: Au moins Windows Server 2025, Windows 11
ADMX file
LanmanWorkstation.admx
Internal name
LanmanWorkstation/Pol_AlternativePortMappings

Explanation

This policy setting determines the alternative port registry mappings used by the SMB client.

If you enable this policy setting, the first valid mapping will be used if the mapping's server name matches the targeted server name for connectivity.

If you enable this policy setting and do not specify at least one valid mapping, or if you disable or do not configure this policy setting, then the SMB client will refer to other methods of determining alternative port usage such as with the NET USE or New-SmbMapping commands.

Examples:

contososa.file.core.windows.net:tcp:448
edgesrv1.corp.contoso.com:quic:450

How to modify this setting:

Arrange the desired alternative port mappings in the edit box with one mapping entry per line.

The format of each mapping entry specifies a server name, transport type, and port number separated by colons as done so in the example above.

Note: This policy does not require a Windows reboot to take effect.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine les mappages de Registre de port alternatifs utilisés par le client SMB.

Si vous activez ce paramètre de stratégie, le premier mappage valide est utilisé si le nom du serveur du mappage correspond au nom du serveur ciblé pour la connectivité.

Si vous activez ce paramètre de stratégie et ne spécifiez pas au moins un mappage valide, ou si vous désactivez ou ne configurez pas ce paramètre de stratégie, le client SMB fait référence à d’autres méthodes de détermination de l’utilisation d’autres ports, telles que les commandes NET USE ou New-SmbMapping.

Exemples:

contososa.file.core.windows.net :tcp :448
edgesrv1.corp.contoso.com :quic :450

Comment modifier ce paramètre :

Organisez les mappages de port de remplacement souhaités dans la zone d’édition avec une entrée de mappage par ligne.

Le format de chaque entrée de mappage spécifie un nom de serveur, un type de transport et un numéro de port séparés par deux-points comme indiqué dans l’exemple ci-dessus.

Remarque : cette stratégie ne nécessite pas de redémarrage de Windows pour prendre effet.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanWorkstation
Value name
not defined in the ADMX

Enable / disable values: not 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.

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: LanmanWorkstation/Pol_AlternativePortMappings
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
#
Set-ItemProperty -Path $k -Name 'AlternativePortMappings' -Value @('<value1>', '<value2>') -Type MultiString

Disable

# Disable: LanmanWorkstation/Pol_AlternativePortMappings
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

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

Options (1)

LabelControlRegistry valueREG typeConstraints / details
MultiText_AlternativePortMappingsMultiline text boxmultiTextAlternativePortMappingsREG_MULTI_SZ

Availability

Windows 11

✓ 26H2✓ 25H2✓ 24H2— 23H2— 22H2— 21H2

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

✓ 2025— 2022— 2016