Open in the explorer

Configure RPC over TCP port

Configurer RPC sur le port TCP

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Printers FR: Configuration ordinateur › Stratégies › Modèles d'administration › Imprimantes
Supported on
At least Windows Server 2016, Windows 10 FR: Au moins Windows Server 2016, Windows 10
ADMX file
Printing.admx
Internal name
Printing/ConfigureRpcTcpPort

Explanation

This policy setting controls which port is used for RPC over TCP for incoming connections to the print spooler and outgoing connections to remote print spoolers.

By default dynamic TCP ports are used.

RPC over TCP port:
-- The port to use for RPC over TCP. A value of 0 is the default and indicates that dynamic TCP ports will be used

If you disable or do not configure this policy setting, dynamic TCP ports are used.

French text from Windows 11 26H2

Ce paramètre de stratégie contrôle le port utilisé pour RPC sur TCP pour les connexions entrantes au spouleur d’impression et les connexions sortantes aux spouleurs d’impression distants.

Par défaut, les ports TCP dynamiques sont utilisés.

Port RPC sur TCP :
-- Port à utiliser pour RPC sur TCP. La valeur 0 est la valeur par défaut et indique que les ports TCP dynamiques seront utilisés

Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les ports TCP dynamiques sont utilisés.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\RPC
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: Printing/ConfigureRpcTcpPort
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# RPC over TCP port
Set-ItemProperty -Path $k -Name 'RpcTcpPort' -Value 0 -Type DWord  # maximum 65535

Disable

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

Revert to "Not configured"

# Revert to "Not configured": Printing/ConfigureRpcTcpPort
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC'
Remove-ItemProperty -Path $k -Name 'RpcTcpPort' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
RPC over TCP port:RPC sur le port TCP :RpcTcpPortNumeric boxdecimalRpcTcpPortREG_DWORD
Max: 65535 · Default (UI): 0

Availability

Windows 10

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

Windows Server

✓ 2025— 2022— 2016