Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows Server 系統教學 >> Server 2008

Windows Remote Management (WinRM) 快速部署指南:Server Core 單開 80/443 埠即可遠端管理

編輯:Server 2008

WinRM 基於 WS-Management 標準,使用 HTTP (80) / HTTPS (443) 通訊,極利於防火牆策略收斂。Server Core 執行 winrm quickconfig(需管理員權限,選 Y)即可啟用。管理端使用 winrs -r:<Core主機名> <指令> 遠端執行指令,無需開放 3389/135/445 等高風險埠。

Server Core 啟用 WinRM

winrm quickconfig

提示選 Y 同意建立 HTTP 監聽器、防火牆例外、啟動服務。

管理端遠端執行指令

winrs -r:ServerCore01 ipconfig /all
winrs -r:ServerCore01 net stop wuauserv
winrs -r:ServerCore01 powershell -command "Get-Service"

進階:HTTPS 傳輸與憑證

  • 生成/匯入伺服器憑證(含私鑰)。
  • winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="fqdn";CertificateThumbprint="xxx"}
  • 管理端加 -use_ssl 參數。

適用場景

  • DMZ/邊界伺服器僅開放 80/443。
  • 自動化腳本批次管理大量 Core 節點。
  • 搭配 PowerShell Remoting (Enable-PSRemoting) 獲得完整互動式會話。
Copyright © Windows教程網 All Rights Reserved