設定 RPC 連線設定 的登錄值 RpcUseNamedPipeProtocol 等 1 個電腦HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC

原則 ID
ConfigureRpcConnectionPolicy
適用範圍
電腦設定
支援的作業系統
至少需要 Windows Server 2016、Windows 10
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
印表機

登錄

RpcUseNamedPipeProtocol

REG_DWORD電腦
啟用時的值
取決於選項值
元素
用於傳出 RPC 連線的通訊協定:
選項
項目儲存的值
RPC over TCP0
名為管道的 RPC over1
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\RPC]

; 選項 (只使用其中一個)
; RPC over TCP
"RpcUseNamedPipeProtocol"=dword:00000000
; 名為管道的 RPC over
"RpcUseNamedPipeProtocol"=dword:00000001
CMD
:: 選項 (只使用其中一個)

:: RPC over TCP
reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC" /v "RpcUseNamedPipeProtocol" /t REG_DWORD /d 0 /f
:: 名為管道的 RPC over
reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC" /v "RpcUseNamedPipeProtocol" /t REG_DWORD /d 1 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Force | Out-Null

# 選項 (只使用其中一個)
# RPC over TCP
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Name 'RpcUseNamedPipeProtocol' -PropertyType DWord -Value 0 -Force | Out-Null
# 名為管道的 RPC over
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Name 'RpcUseNamedPipeProtocol' -PropertyType DWord -Value 1 -Force | Out-Null

RpcAuthentication

REG_DWORD電腦
啟用時的值
取決於選項值
元素
對傳出 RPC 連線使用驗證:
選項
項目儲存的值
預設值0
驗證已啟用1
驗證已停用2
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\RPC]

; 選項 (只使用其中一個)
; 預設值
"RpcAuthentication"=dword:00000000
; 驗證已啟用
"RpcAuthentication"=dword:00000001
; 驗證已停用
"RpcAuthentication"=dword:00000002
CMD
:: 選項 (只使用其中一個)

:: 預設值
reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC" /v "RpcAuthentication" /t REG_DWORD /d 0 /f
:: 驗證已啟用
reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC" /v "RpcAuthentication" /t REG_DWORD /d 1 /f
:: 驗證已停用
reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\RPC" /v "RpcAuthentication" /t REG_DWORD /d 2 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Force | Out-Null

# 選項 (只使用其中一個)
# 預設值
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Name 'RpcAuthentication' -PropertyType DWord -Value 0 -Force | Out-Null
# 驗證已啟用
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Name 'RpcAuthentication' -PropertyType DWord -Value 1 -Force | Out-Null
# 驗證已停用
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\RPC' -Name 'RpcAuthentication' -PropertyType DWord -Value 2 -Force | Out-Null