下載 Windows Admin Center:全面指南

如果您想學習如何下載Windows Admin Center,設置並調整Windows Admin Center的端口,那麼您來對地方了。

在本教程中,您將從頭開始學習如何設置Windows Admin Center,從下載一直到安裝新擴展!

先決條件

為了充分檢查Windows Admin Center的功能,您需要不僅僅是一台桌面電腦。要跟隨本教程,您需要以下內容:

  • A test Windows domain with a domain controller. This guide is a good place to start if you do not have one in place.
  • A fresh install of Windows Server 2016 or Windows Server 2019 (This article will be using Windows Server Core 2019). You can find the installation media on Microsoft’s Website.

Windows Admin Center適用於Windows 10,但不允許遠程訪問。它將像應用程序一樣啟動,只能從啟動它的計算機上使用。Windows Server允許從任何帶有Web瀏覽器的計算機使用Windows Admin Center。

下載Windows Admin Center(含安裝)

Windows Admin Center可以在Microsoft的網站上免費獲得MSI文件。Windows Admin Center不需要授權費用,可安裝在Windows 10(1709或更高版本)或Windows Server 2016及以上版本。

下載並安裝Windows Admin Center通常是一個無縫的過程。您可以通過Windows Server評估門戶或者只使用直接下載鏈接找到它。

為了節省下載 Windows Admin Center 的時間,以下是一個 PowerShell 片段,可以在您的 Windows Server 上進行下載和安裝。

請注意下面的 SME_PORT=6516 選項。預設情況下,Windows Admin Center 的埠號為 6516。如果您想在安裝時更改埠號,可以在這裡進行設定。 SSL_CERTIFICATE_OPTION 選項用於創建供 Windows Admin Center 使用的自簽名憑證。

## 下載 msi 檔案
Invoke-WebRequest 'https://aka.ms/WACDownload' -OutFile "$pwd\WAC.msi"

## 安裝 Windows Admin Center
$msiArgs = @("/i", "$pwd\WAC.msi", "/qn", "/L*v", "log.txt", "SME_PORT=6516", "SSL_CERTIFICATE_OPTION=generate")
Start-Process msiexec.exe -Wait -ArgumentList $msiArgs

新增防火牆規則

MSI 安裝程式會自動允許對 Windows Admin Center 埠號的遠端訪問,但這僅適用於您網路的當前狀態。但如果您的網路配置文件變更(例如,從私有網路變更為域網路),則該訪問權限將變得無效。

A network profile is a set of firewall rules that can change depending on the state of your server. You can think of it is as a security group for firewall settings. Typically there are four profiles: Public, Private, Work, and Domain.

如果您的伺服器目前是在工作群組中(本教程將假設如此),請確保為 Windows Admin Center 的埠號 6516(或您在上面的 SME_PORT 選項中設定的任何埠號)創建入站規則的 Windows 防火牆例外。

當 Windows 伺服器加入域時,網路配置文件將變更為 Domain,如果未為 Domain 網路配置文件定義,則可能無法訪問 Windows Admin Center。

以下是幾個 PowerShell 命令,用於開放 Windows Admin Center 埠號。

> New-NetFirewallRule -DisplayName "Allow Windows Admin Center" -Direction Outbound -profile Domain -LocalPort 6516 -Protocol TCP -Action Allow

> New-NetFirewallRule -DisplayName "Allow Windows Admin Center" -Direction Inbound -profile Domain -LocalPort 6516 -Protocol TCP -Action Allow

登入 Windows Admin Center

現在,您已經初步安裝了 Windows Admin Center,可以使用網頁瀏覽器(如 Chrome 或新的 Microsoft Edge)來開始管理您的伺服器。

要存取 Windows Admin Center:

  1. 在與 Windows 伺服器相同的區域網路上的任何電腦上開啟網頁瀏覽器,然後前往 https://<server ip>:6516。本指南使用的是 https://10.20.100.4:6516

如果您不知道伺服器的 IP,可以在伺服器上的 PowerShell 控制台中執行 ipconfig 來檢索它。

相關資訊:您需要了解的 ipconfig 命令

2. 您可能會看到一個大警告,顯示 您的連線不是私人的。選擇「顯示進階」,然後選擇「前往 <IP>(不安全)。點擊 前往 <server IP>(不安全)

出現此警告是因為 Windows Admin Center 使用了自簽名憑證,而您的本地瀏覽器不信任它。

The Chrome SSL warning for a bad SSL certificate

3. 在「登入」提示中提供本地管理員的使用者名稱和密碼。

本教程為方便起見使用本地管理員帳戶,但您可以通過查看「使用者存取選項文件」進一步了解這個區域的高級功能。

Using the built in local administrator account to log in

使用 Windows Admin Center 加入網域

Windows Admin Center具有多种功能和管理Windows Server的方法。为了演示Windows Admin Center的功能,让我们简要介绍如何将Windows Server添加到域中。

当您首次登录时,您将看到一个计算机列表,实际上只有一台计算机:您安装了Windows Admin Center的计算机。您可以在下面的示例中看到这个屏幕的样子。

  1. 要选择要操作的服务器,请单击列表中的(可能唯一的)Windows服务器。
The Server Chooser in Windows Admin Center

2. 选择后,Windows Admin Center会向您展示Windows Admin Center服务器的仪表板(如下所示)。您还会注意到计算机名称(1)是随机生成的(如果您使用了Windows安装程序),而域(2)不存在。

The main Dashboard of Windows Admin Center

3. 在仪表板上选择编辑计算机ID。计算机ID是Windows Admin Center定义主机名和域成员身份等常见属性的方式。

Editing the computer properties

4. 输入所需的计算机名称和域。本教程使用一个名为ad.gurucomputing.com.au的域和Test-Server-2019作为计算机名称。

Changing the Computer Name and Domain at the same time

5. 提供具有加入域权限的域用户和密码(本文使用ad.gurucomputing.com.au/christopher.bisset),启用立即重启复选框,并单击保存。然后,您将被提示重新启动并选择是否这样做。

Including the credentials of someone authorized to join computers to the domain

6. 重新啟動後,使用您的域管理員憑證(而不是本地管理員帳戶)登錄到 Windows Admin Center(例如:https://10.20.100.4:6516),然後再次點擊測試的 Windows 伺服器。

現在您應該能看到更新的儀表板視圖。您現在應該會注意到下面的截圖中計算機名稱和域名已經更新了。

The computer name and domain are now updated to reflect the changes.

請注意,左上角的名稱被截斷了,因為舊系統只支持最多 15 個字符。

探索側邊欄分類

現在您已成功加入域,可以開始探索 Windows Admin Center 提供的選項。您立即會注意到大多數側邊欄分類(下面截圖中的左側菜單)看起來很像控制面板分類,事實上,它們中的大多數確實是。

Windows Admin Center 設計成用於取代伺服器管理的網頁。大多數分類(例如防火牆、已安裝的應用程式等)是控制面板的直接替代品。

例如,在查看 Windows 伺服器時,選擇 防火牆 分類。您將看到您之前使用 PowerShell 創建的防火牆例外。

The firewall rules placed earlier by PowerShell

還有幾個分類專為遠程管理伺服器而設計。檔案和檔案共享 允許您直接上傳、下載或修改伺服器上的檔案,如下面的截圖所示。

An overview of the file browser in Windows Admin Center

特別是PowerShell遠端桌面類別非常有趣。PowerShell允許您直接在遠程機器上打開遠程終端,就像您正在本機使用遠程PowerShell一樣!

The PowerShell console within the browser

這個遠程PowerShell控制台對於工作組伺服器尤其有幫助,遠程管理工作組伺服器在沒有域的情況下可能非常棘手

遠端桌面選項允許您直接在瀏覽器中打開RDP。在瀏覽器中使用RDP意味著您可以在Windows管理中心中進行完整的遠程桌面會話!

Viewing the remote desktop of Server Core 2019 (it is not very interesting as Server Core 2019 has no GUI)

還有十幾個其他類別,在本文中將不詳細介紹。它們大多類似於控制面板,並且相當容易理解。相反,讓我們來探索如何使用Windows管理中心擴展來管理Active Directory。

使用Windows管理中心擴展管理Active Directory

Windows管理中心具有可擴展的系統,支持添加更多功能的擴展。它支持大量的擴展,用於各種管理任務(實際上,一些側邊欄類別是Microsoft捆綁的擴展)。

A Windows Admin Center Extension is an optional extra that adds additional functionality. This could include cluster management, virtual machine management, or active directory management (as seen below)

為了演示擴展,讓我們安裝Active Directory擴展。

有關Active Directory擴展的完整演示,這個網站做得很好。

  1. 當在主要的Windows Admin Center頁面上,選擇右上角的設置齒輪(1)

2. 在左側點擊擴展(2),如下圖所示。您將看到已安裝和可用的擴展列表:

Navigating to the Extensions Portal

3. 點擊Active Directory擴展並點擊安裝

Adding the Active Directory Extension

值得瀏覽擴展列表,看看有什麼可用。許多與Microsoft相關的服務都有Windows Admin Center的擴展。

安裝完成後,Active Directory選項將從可用擴展移至已安裝擴展

4. 如果您正在遠程管理域控制器(稍後在本文中介紹),您可以在側邊欄中看到現在有一個Active Directory選項。點擊它並開始管理Active Directory。

Browsing OUs in the Active Directory Extension

由於您很可能不會在域控制器上使用Windows Admin Center,所以Active Directory部分不會像上面的截圖中那樣出現在側邊欄中。這個問題將很快解決。

對於熟悉Active Directory管理工具(不要與Windows Admin Center混淆)的人來說,這將是一個非常相似的體驗。主要的區別在於您不使用Microsoft的遠程服務擴展:您使用的是完全沒有本地安裝工具的Web界面。

它全部都是 PowerShell

你可能不知道的是,PowerShell 驅動了 Windows 管理中心的整個後端。每次更改設置或查看儀表板時,相應的 PowerShell 腳本都會在後台運行以執行該變更。事實上,你可以在 Windows 管理中心中窺探並直接提取它運行的 PowerShell 腳本!

檢查防火牆 PowerShell 函數

再次返回到防火牆類別,然後按下如下所示的「查看 PowerShell 腳本」圖示。這樣會彈出一個新面板,顯示一個 PowerShell 函數的下拉清單。選擇一個選項(如下面的「Disable-FirewallRule」選項)會顯示 Windows 管理中心用於執行任務的相應函數。

此類檢查可用於側邊欄中的每個類別。

Viewing the Underlying PowerShell in the backend

這是一個方便的工具,因為它讓你直接查看 Microsoft 如何結構化他們所有的 PowerShell,並在編寫自己的 PowerShell 腳本時提供了大量的最佳實踐示例!

遠程管理其他伺服器

如果你認為你需要在環境中的每個伺服器上安裝 Windows 管理中心,那你就錯了。事實上,Windows 管理中心只需要存在於一個伺服器上。因為 Windows 管理中心在幕後使用 PowerShell 執行所有工作,你只需要在伺服器上啟用 PowerShell 遠程管理即可!

讓我們在本文中展示這一點,通過遠程連接到域控制器。

如果您正在生產環境中操作,您可能沒有權限遠程管理您的域控制器。在檢查您的 IT 政策之前,請勿在敏感設備上測試任何功能!

  1. 點擊左上角的Windows 管理中心標題,返回服務器列表

2. 點擊新增按鈕。

The Server Chooser in Windows Admin Center

3. 點擊服務器

4. 手動輸入域控制器的計算機名稱,或在搜索 Active Directory框中搜索。

5. 將服務器添加到列表中。

6. 選擇服務器,輸入您的域憑據。

您可以在下面的動畫中看到這些步驟:

Adding another computer to the Server chooser

現在,您已經為您的域控制器添加了一個 Web 接口,而且您甚至不需要安裝任何東西!

您的瀏覽器只是使用 Windows 管理中心服務器作為主機,並在域控制器上運行所有後端命令!

如果您已經為控制器啟用了遠程桌面,您甚至可以將 Windows 管理中心服務器用作跳板來管理域控制器!請參閱下面的完全功能 RDP 會話:

Remotely managing the Domain Controller, even though the PC using the browser has no direct connection.

在上面的示例中,運行瀏覽器的計算機無法直接訪問域控制器。相反,瀏覽器與 Windows 管理中心服務器進行交互,而 Windows 管理中心服務器則與域控制器進行通信。您可以使用此方法遠程訪問受限制或敏感設備。

從這裡開始去哪裡

如果你想的話,Windows管理中心可以用來管理你的整個服務器群。你可以在Microsoft的網站上找到詳細的文檔。在某種程度上,Windows管理中心甚至可以管理你的整個終端(儘管像MeshcentralTeamViewer這樣的RMM工具更適合終端)。

Windows管理中心是你工具箱中的另一個工具,對於管理無GUI環境非常有用。

Source:
https://adamtheautomator.com/download-windows-admin-center/