藉由使用 Windows Admin Center,您可以管理在 Amazon Web Services 中的 Amazon EC2 上執行的 Windows Server 機器。 在本文中,您將瞭解如何使用公用IP位址,準備及將Amazon EC2上執行的 Windows Server 機器連線到 Windows Admin Center。
先決條件
- 擁有執行中的 Amazon EC2 實例。
- 設定適用於 HTTPS 的 WinRM。 WinRM HTTPS 需要本機計算機的伺服器驗證憑證,且 CN 符合 Windows Server Amazon EC2 實例的公用名稱。 如需詳細資訊,請參閱 如何為 HTTPS 設定 WINRM。
- 啟用 Amazon EC2 實例的輸入連線。 如需詳細資訊,請參閱 AWS 檔。
- 針對 類型,選取 WinRM-HTTPS。 針對埠範圍,輸入 5986。
- 針對 [來源],選取 [IP 位址],然後輸入對應至 Windows Admin Center 網關的來源 IP 位址。
備註
或者,您可以選取 WinRM-HTTP,然後輸入 5985 作為埠範圍,以透過 HTTP 連線至 Amazon EC2 實例。 不過,我們建議您考慮安全性影響。
準備您的電腦
使用下列步驟設定 Windows Server Amazon EC2 實例:
在目標 EC2 實例的 PowerShell 中執行
winrm quickconfig
命令,以啟用對目標 Amazon EC2 實例的 WinRM 存取。在目標 EC2 實例上執行下列 PowerShell 腳本,為 WinRM 透過 HTTPS 啟用埠 5986 的輸入連線:
Set-NetFirewallRule -Name WINRM-HTTPS-In-TCP-PUBLIC -RemoteAddress Any
。 或者,您可以針對 WinRM over HTTP 設定埠 5985。
連接到您的機器
在 Windows Admin Center 中,將您的 Windows Server Amazon EC2 實例新增為連線:
在 Azure 入口網站中,開啟 Windows Admin Center。
在 [新增或建立資源] 功能表上的 [伺服器] 區段中,選取 [新增]。
針對 伺服器名稱,輸入 Amazon EC2 實例的公用 IPv4 位址。
選取 [使用此連線的另一個帳戶,然後輸入您的 Windows 認證。
相關內容
既然您已使用 Windows Admin Center 設定 Amazon EC2 實例,請瞭解如何管理它:
- 使用 Windows Admin Center 管理伺服器