如何啟用 Windows 遠端殼層

本文可協助您啟用 Windows 遠端殼層。

適用於:Windows Server 2003
原始 KB 編號: 555966

本文是由 Microsoft MVP Yuval Sinay 所撰寫。

提示

若要啟用 Windows 遠端殼層,您必須部署伺服器端和客戶端設定:

伺服器端

注意事項

本文中的伺服器定義說明進入遠端管理命令介面的 Windows 主機。

  1. 登入 Windows 控制台。

  2. 選擇性 (Windows Vista 可作為遠端伺服器) :啟動「Windows 遠端管理」服務,並將其設定為在重新啟動後自動啟動。

  3. 撰寫命令提示字元 WinRM quickconfig ,然後按 Enter 按鈕。

  4. 應該會出現下列輸出:

    WinRM is not set up to allow remote access to this machine for management.
    The following changes must be made:
    
    Set the WinRM service type to delayed auto start.
    Start the WinRM service.
    Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
    machine.
    
    Make these changes [y/n]? y
    
  5. 按下 y 按鈕之後,應該會出現下列輸出:

    WinRM has been updated for remote management.
    
    WinRM service type changed successfully.
    WinRM service started.
    Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    

    注意事項

    建議您透過 winrm.cmd 命令變更預設設定 (Like 啟用 HTTPS 支援等 ) 。

    使用SOAP的 Windows 遠端殼層。 某些防火牆可能會封鎖SOAP流量。 如需詳細資訊,請參閱廠商檔。

用戶端

在 Windows Vista/Windows 2008 主機上,使用 命令 winrs -r:%servername% remote command 並按 Enter 按鈕。

範例:若要檢閱遠端檔案系統,請撰寫下列命令:

winrs -r:DC1 dir

注意事項

在 Windows Workgroup 環境中,需要為用戶端使用 命令 winrm set winrm/config/client @{TrustedHosts="%servername1%,"%servername2%"}起始連線的伺服器新增信任。

使用 命令 winrm enumerate winrm/config/listener來驗證新的設定。

Community 解決方案內容免責聲明

Microsoft 公司和/或其各自的供應商不代表此資訊和其所含相關圖形的適用性、可靠性或精確度。 所有這類資訊和相關圖形都會以「原狀」提供,而不需要任何種類的擔保。 Microsoft 和/或其各自的供應商在這裡免責與此資訊和相關圖形相關的所有瑕疵擔保和條件,包括所有隱含的瑕疵擔保和適售性條件、適合特定用途、工作方式、職稱和非侵權。 您特別同意,在任何情況下,Microsoft 和/或其供應商都不應該對任何直接、間接、懲罰性、附帶性、特殊、衍生性損害或任何損害負責,包括,不限於使用損失、資料或獲利、因使用或無法使用此處所包含的資訊和相關圖形而產生的損害, 不論是根據合約、侵權、過失、嚴格責任,還是如此,即使 Microsoft 或其任何供應商都已獲得損害的可能性。