開始使用 Windows Admin Center

適用於:Windows Admin Center、Windows Admin Center 預覽

本文說明在您下載 Windows Admin Center 並將其安裝在 Windows 電腦上之後,如何開始使用 Windows Admin Center。 下載 Windows Admin Center。 若要閱讀安裝的相關資訊,請參閱在電腦或伺服器上安裝 Windows Admin Center。 若要深入了解 Windows Admin Center,請參閱 Windows Admin Center 概觀

在 Windows PC 上部署 Windows Admin Center

Windows Admin Center 可讓您使用網頁瀏覽器直接從 Windows 10 電腦管理伺服器、叢集、Windows 電腦和 Azure 虛擬機器 (VM)。

重要

您必須是本機系統管理員群組的成員,才能在 Windows 10 上使用 Windows Admin Center。

請遵循下列步驟,在 Windows 電腦上開啟 Windows Admin Center:

  1. [開始]功能表選取 [Windows Admin Center]。 或在搜尋列中輸入 Windows Admin Center ,然後從搜尋結果中選取它。 Windows Admin Center 會以 URL 在您的預設瀏覽器中開啟: https://localhost:6516/。 或者,您也可以輸入 https://localhost:6516/,從所需的瀏覽器啟動它。

    系統會顯示選取憑證以進行驗證的提示。

    注意

    Windows Admin Center 的現代閘道建置過程中,系統會請您登入 Windows Admin Center 閘道,而不是出現證明文件的提示。 步驟二不適用。

  2. 選取標示 Windows Admin Center 用戶端的憑證,然後選取[確定]。 您也可以選取憑證資訊連結,以查看憑證的詳細資料。

    Screenshot of the prompt showing options to select a certificate.

    重要

    當出現提示時,請務必選取 Windows Admin Center 用戶端憑證,而不是任何其他憑證。 如果您選取任何其他憑證,會出現下列錯誤訊息:

    您無權檢視此頁面。 如果您最近更新了 Windows Admin Center,您可能需要重新開機瀏覽器,然後重新整理頁面。

    如果您在重新啟動瀏覽器並重新整理頁面之後,仍然遇到同樣的錯誤,請嘗試清除瀏覽器快取或切換至另一個瀏覽器。 如果上述疑難排解步驟都無法解決問題,您可能需要卸載並重新安裝 Windows Admin Center,然後重新啟動。

  3. (僅限第一次) 隨即出現快顯視窗,確認您的 Windows Admin Center 版本已成功安裝。 它也提供此版本新功能的相關資訊。 關閉視窗以繼續。

    Screenshot of the message showing that Windows Admin Center is successfully installed.

    [所有連線]頁面會顯示您的 Windows 10 電腦名稱,列在連線清單底下。 您現在已準備好將連線新增至 Windows Admin Center。

將連線新增至 Windows Admin Center

您可以從[所有連線]頁面,將連線以受控節點的形式新增至 Windows Admin Center。 這是啟動 Windows Admin Center 時顯示的預設頁面。 您可以從此頁面新增現有的資源作為連線,或建立新的資源。 您新增的資源會出現在[所有連線]頁面上的連線清單中。

您可以從[所有連線]頁面新增的資源類型為伺服器、Windows 電腦、叢集和 Azure VM,而您可以建立的資源是叢集和 Azure VM。

注意

若要新增或建立 Azure VM,您必須先向 Azure 註冊 Windows Admin Center。

若要將連線新增至 Windows Admin Center

  1. 按一下[所有連線]下的[+新增]

    Screenshot of All Connections page.

  2. 您可以新增的資源類型隨即顯示。 針對您要新增的資源類型,選取[新增]

    Screenshot of Add resources page displaying resource types to add.

  3. Windows Admin Center 支援根據資源類型新增資源的各種方法:

    • 一次新增一項資源
    • 藉由大量匯入新增多個資源
    • 藉由搜尋 Active Directory 來新增資源

    根據您要新增資源的方式選取索引標籤。 每個索引標籤的標籤會根據您要新增的資源類型而有所不同。

    此為預設模式。 新增叢集時,此索引標籤會顯示為[新增叢集]

    1. 選取[新增一個][新增叢集]索引標籤。預設會選取此索引標籤。

    2. 在 [資源名稱] 方塊中輸入資源的名稱。

      Screenshot of Add resources page when the Add one tab is selected.

      當您開始輸入文字時,Windows Admin Center 會根據您的輸入文字字串開始搜尋資源。 如果找到相符資源,您可以新增名稱,如同您輸入或使用預設資源名稱一樣。 如果找不到相符資源,您仍然可以新增此資源,使其出現在連線清單中。


  1. (選擇性) 選取[新增標籤]以新增連線標籤。 您可以使用標籤來識別和篩選連線清單中的相關資源。 如需使用標籤的詳細資訊,請參閱使用標籤來整理您的連線

  2. 當您完成新增資源時,請選取[新增]

    選取的資源會顯示在[所有連線]頁面上的連線清單下方。

使用受控節點進行驗證

將連線新增為受控節點之後,您必須向它們進行驗證才能連線。 Windows Admin Center 支援幾種向受控節點進行驗證的機制。 單一登入是預設值。

注意

為了執行遠端系統管理,Windows Admin Center 會模擬提供使用者的安全性內容,並使用該安全性內容來存取電腦。 提供的使用者列在[所有連線]頁面上的[管理身分]資料行下方。

透過單一登入進行驗證

您可以使用目前的 Windows 認證向受控節點進行驗證。 這是預設值,而 Windows Admin Center 會在您新增資源時嘗試單一登入。

在部署為 Windows Server 上的服務時透過單一登入進行驗證

如果您已在 Windows Server 上安裝 Windows Admin Center,則單一登入需要額外的設定。 如需詳細資訊,請參閱設定環境以進行委派

藉由指定認證進行驗證

[所有連線]下,從清單中選取資源,然後選擇 [管理身分],以指定您將用來向受控節點進行驗證的認證:

Screenshot of the All connections page with the Manage As option.

如果 Windows Admin Center 在 Windows Server 上以服務模式執行,但未設定 Kerberos 委派,則必須重新輸入 Windows 認證:

Screenshot of the Specify your credentials page.

您可以將認證套用至所有連線,這樣會快取該特定瀏覽器工作階段的認證。 如果您重新載入瀏覽器,您必須重新輸入[管理身分]作為認證。

透過區域系統管理員密碼解決方案進行驗證

如果您的環境使用本機系統管理員密碼解決方案 (LAPS),而且您已在 Windows 10 電腦上安裝了 Windows Admin Center,您可以使用 LAPS 認證向受控節點進行驗證。 如果您使用此案例, 在這裡提供意見反應

使用標籤來整理您的連線

您可以使用標籤來識別和篩選連線清單中的相關資源。 這可讓您在連線清單中看到資源的子集。 如果您有許多連線,這會特別有用。

編輯標籤

您可以在新增連線時,將標籤新增至連線。 或者,您可以稍後從[所有連線]頁面新增或編輯一個或多個連線。

若要新增或編輯標籤:

  1. 從連線清單中選取一個或多個連線。

  2. 選取[編輯標籤]

    Screenshot of the Edit tags option.

    [可用的標籤]窗格隨即在右側開啟。

  3. 從選取的連線新增、編輯或移除標籤。

    • 若要將新的標籤新增至選取的連接,請選取[新增標籤],然後輸入所需的標籤名稱。

    • 若要標記具有現有標籤名稱的選取連線,請選取您想要套用的標籤名稱旁的核取方塊。

    • 若要從所有選取的連線中移除標籤,請清除您想要移除的標籤旁的核取方塊。

    • 如果標籤套用至所選連線的子集,核取方塊會顯示為中繼狀態。 您可以選取核取方塊來選取它,並將標籤套用至所有選取的連線,或再次選取以清除它,並從所有選取的連線中移除標記。

      Screenshot of the available tags.

  4. 完成時,請選取[儲存]以儲存變更。

依標籤篩選連線

將標籤新增至一個或多個連線之後,您可以檢視連線清單中的標籤,並依據標籤篩選連線清單。

  • 若要依標籤進行篩選,請選取搜尋方塊旁的篩選圖示。

    Screenshot of the filter using the search box.

  • 您可以選取 [Or]、[And] 或 [Not] 來修改所選標籤的篩選行為。

    Screenshot of the Filter Connections page.

使用 PowerShell 匯入或匯出您的連線 (包含標籤)

# Load the module
Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ConnectionTools"
# Available cmdlets: Export-Connection, Import-Connection

# Export connections (including tags) to a .csv file
Export-Connection "https://wac.contoso.com" -fileName "WAC-connections.csv"
# Import connections (including tags) from a .csv file
Import-Connection "https://wac.contoso.com" -fileName "WAC-connections.csv"
# Import connections (including tags) from .csv files, and remove any connections that are not explicitly in the imported file using the -prune switch parameter 
Import-Connection "https://wac.contoso.com" -fileName "WAC-connections.csv" -prune

用於匯入連線的 CSV 檔案格式

CSV 檔案的格式會以此四個標題開頭:"name","type","tags","groupId",然後接著新一行上的每個連線。

名稱是連線的 FQDN

類型是連線類型。 針對 Windows Admin Center 隨附的預設連線,您將使用下列其中一項:

Connection type Connection string
Windows Server msft.sme.connection-type.server
容錯移轉叢集 msft.sme.connection-type.cluster

標記會以管線分隔。

groupId 會用於共用連線。 使用此資料行中的 global 值,使此項目成為共用連線。

注意

修改共用連線僅限於閘道系統管理員可進行 - 任何使用者都可以使用 PowerShell 來修改其個人連線清單。

用於匯入連線的 CSV 檔案範例

"name","type","tags","groupId"
"myServer.contoso.com","msft.sme.connection-type.server","hyperv"
"myDesktop.contoso.com","msft.sme.connection-type.windows-server","hyperv"
"teamcluster.contoso.com","msft.sme.connection-type.cluster","legacyCluster|WS2016","global"
"myHCIcluster.contoso.com,"msft.sme.connection-type.cluster","myHCIcluster|hyperv|JIT|WS2019"
"teamclusterNode.contoso.com","msft.sme.connection-type.server","legacyCluster|WS2016","global"
"myHCIclusterNode.contoso.com","msft.sme.connection-type.server","myHCIcluster|hyperv|JIT|WS2019"

注意

CSV 檔案會分大小寫。

匯入 RDCman 連線

使用下列指令碼,將 RDCman 中已儲存的連線匯出至檔案。 接著,您可以將檔案匯入 Windows Admin Center,使用標記來維護 RDCMan 群組階層。 試試看!

  1. 將下列程式碼複製並貼到您的 PowerShell 工作階段:

    #Helper function for RdgToWacCsv
    function AddServers {
     param (
     [Parameter(Mandatory = $true)]
     [Xml.XmlLinkedNode]
     $node,
     [Parameter()]
     [String[]]
     $tags,
     [Parameter(Mandatory = $true)]
     [String]
     $csvPath
     )
     if ($node.LocalName -eq 'server') {
         $serverName = $node.properties.name
         $tagString = $tags -join "|"
         Add-Content -Path $csvPath -Value ('"'+ $serverName + '","msft.sme.connection-type.server","'+ $tagString +'"')
     } 
     elseif ($node.LocalName -eq 'group' -or $node.LocalName -eq 'file') {
         $groupName = $node.properties.name
         $tags+=$groupName
         $currNode = $node.properties.NextSibling
         while ($currNode) {
             AddServers -node $currNode -tags $tags -csvPath $csvPath
             $currNode = $currNode.NextSibling
         }
     } 
     else {
         # Node type isn't relevant to tagging or adding connections in WAC
     }
     return
    }
    
    <#
    .SYNOPSIS
    Convert an .rdg file from Remote Desktop Connection Manager into a .csv that can be imported into Windows Admin Center, maintaining groups via server tags. This will not modify the existing .rdg file and will create a new .csv file
    
     .DESCRIPTION
     This converts an .rdg file into a .csv that can be imported into Windows Admin Center.
    
     .PARAMETER RDGfilepath
     The path of the .rdg file to be converted. This file will not be modified, only read.
    
     .PARAMETER CSVdirectory
     Optional. The directory you wish to export the new .csv file. If not provided, the new file is created in the same directory as the .rdg file.
    
     .EXAMPLE
     C:\PS> RdgToWacCsv -RDGfilepath "rdcmangroup.rdg"
     #>
    function RdgToWacCsv {
     param(
         [Parameter(Mandatory = $true)]
         [String]
         $RDGfilepath,
         [Parameter(Mandatory = $false)]
         [String]
         $CSVdirectory
     )
     [xml]$RDGfile = Get-Content -Path $RDGfilepath
     $node = $RDGfile.RDCMan.file
     if (!$CSVdirectory){
         $csvPath = [System.IO.Path]::GetDirectoryName($RDGfilepath) + [System.IO.Path]::GetFileNameWithoutExtension($RDGfilepath) + "_WAC.csv"
     } else {
         $csvPath = $CSVdirectory + [System.IO.Path]::GetFileNameWithoutExtension($RDGfilepath) + "_WAC.csv"
     }
     New-item -Path $csvPath
     Add-Content -Path $csvPath -Value '"name","type","tags"'
     AddServers -node $node -csvPath $csvPath
     Write-Host "Converted $RDGfilepath `nOutput: $csvPath"
    }
    
  2. 若要建立 .CSV 檔案,請執行下列命令:

    RdgToWacCsv -RDGfilepath "path\to\myRDCManfile.rdg"
    
  3. 將所產生的 .CSV 檔案匯入 Windows Admin Center,而您所有的 RDCMan 群組階層都會透過標記呈現在連線清單中。 如需詳細資訊,請參閱使用 PowerShell 匯入或匯出您的連線 (包含標記)

檢視 Windows Admin Center 中使用的 PowerShell 腳本

連線到伺服器、叢集或電腦之後,您可以查看在 Windows Admin Center 中提供 UI 動作的 PowerShell 指令碼。 從工具內,按一下頂端應用程式行中的 PowerShell 圖示。 從下拉式清單中選取感興趣的命令,以瀏覽覽至對應的 PowerShell 腳本。

Screenshot of the View PowerShell scripts for Overview page.