开始使用 Windows Admin Center

开始使用 Windows Admin Center

This article describes how to get started with Windows Admin Center after you download and install it on a Windows PC. 若要详细了解 Windows Admin Center,请参阅 Windows Admin Center概述。

在 Windows PC 上打开 Windows Admin Center

使用 Windows Admin Center,可以使用 Web 浏览器直接从 Windows 10 计算机管理服务器、群集、Windows 电脑和 Azure 虚拟机(VM)。

Important

你必须是本地管理员组的成员才能在 Windows 10 上使用 Windows Admin Center。

按照以下步骤在 Windows 电脑上打开 Windows Admin Center:

On the Start menu, select Windows Admin Center. 或在搜索栏上输入 Windows Admin Center ,然后从搜索结果中选择它。

Windows Admin Center 使用 URL https://localhost:6516/在默认浏览器中打开。 或者,可以通过输入 https://localhost:6516/从所需浏览器启动它。

会出现用于选择证书进行身份验证的提示。

Note

在 Windows Admin Center 的现代化网关版本中,系统会要求你登录到 Windows Admin Center 网关,而不是选择证书。 此步骤不适用。

选择标记为 Windows Admin Center 客户端的证书,然后选择“ 确定”。 You can also select the Certificate information link to see more details about the certificate.

Important

请务必选择 Windows Admin Center 客户端 ,而不选择任何其他证书。 如果选择任何其他证书,将显示以下错误消息:

“你无权查看此页面。 如果最近更新了 Windows Admin Center,则可能需要重启浏览器,然后刷新页面。

如果在重启浏览器并刷新页面后仍收到相同的错误,请尝试清除浏览器缓存或切换到其他浏览器。 如果上述任何故障排除步骤都无法解决问题,则可能需要卸载并重新安装 Windows Admin Center,然后重启它。

(仅第一次:)弹出窗口确认 Windows Admin Center 版本已成功安装。 还会提供有关此版本中的新增功能的信息。 关闭窗口以继续操作。

The All connections page shows your Windows 10 computer name in the list of connections. 现在可以在 Windows Admin Center 中添加连接。

在 Windows Admin Center 中添加连接

You can add connections as managed nodes to Windows Admin Center from the All connections page. All connections is the default page that appears when you open Windows Admin Center. 在此页上,可以将现有资源添加为连接或创建新资源。 添加的资源将显示在连接列表中。

The types of resources that you can add from the All connections page are servers, Windows PCs, clusters, and Azure VMs. 可以创建的资源是群集和 Azure VM。

Note

若要添加或创建 Azure VM,必须先向 Azure 注册 Windows Admin Center。

若要将连接添加到Windows Admin Center:

Under All connections, select + Add.

将显示可以添加的资源类型。 Select Add for the resource type that you want to add.

Windows Admin Center 支持各种添加资源的方法,具体取决于资源类型:

一次添加一个资源。

通过批量导入添加多个资源。

通过搜索 Active Directory 添加资源。

根据要添加资源的方式选择选项卡。 每个选项卡的标签可能因要添加的资源类型而异。

Add one

导入列表

搜索 Active Directory

一次添加一个资源是默认方法。 The label for this tab appears as Add cluster when you're adding a cluster.

Select the Add one or Add cluster tab.

In the Server name box, enter the name of the resource.

开始输入文本时,Windows Admin Center 会基于文本字符串开始搜索资源。 如果找到匹配项,则可以完全按照输入添加名称或使用默认资源名称。 如果未找到匹配项,仍可以添加此资源以显示在连接列表中。

可以通过 .txt 或 .csv 文件进行批量导入,从而一次添加多个资源。 The label for this tab appears as Import clusters when you're bulk importing multiple clusters.

选择“ 导入列表 ”选项卡。或选择“ 导入群集 ”以批量导入群集。

Under Import source, select the Select a file button to browse and select the file to import. 或者拖放文件。 该文件可以是包含逗号的 .txt 或 .csv 文件,也可以是要添加的新行分隔的资源列表。

Note

使用 PowerShell 导出连接 创建的 .csv 文件包含服务器名称之外的其他信息。 它与此导入方法不兼容。

若要使用此搜索选项,必须将 Windows Admin Center 计算机加入 Active Directory 域,并且你的帐户必须具有从 Active Directory 读取的权限。

选择“搜索 Active Directory”选项卡。

Enter your search criteria and then select Search. 支持通配符 (*)。

(Optional:) Select Add tags to add connection tags. 可以使用标记来标识和筛选连接列表中的相关资源。 有关详细信息,请参阅本文后面的 “使用标记来组织连接 ”。

When you finish adding resources, select Add.

The selected resources appear in the connection list on the All connections page.

使用托管节点进行身份验证

将连接添加为托管节点后,必须使用它们进行身份验证才能连接。

Windows Admin Center 支持多种机制来对托管节点进行身份验证。 单一登录是默认登录。

Note

为了执行远程管理,Windows Admin Center 会模拟所提供的用户的安全上下文,并使用该安全上下文来访问计算机。 The provided user is listed in the Managing As column on the All Connections page.

使用单一登录进行身份验证

可以使用当前的 Windows 凭据向托管节点进行身份验证。 此身份验证是默认设置,Windows Admin Center 在添加资源时会尝试单一登录。

当 Windows Admin Center 部署为 Windows Server 上的服务时,通过单一登录进行身份验证

如果在 Windows Server 上安装 Windows Admin Center,则单一登录需要其他配置。 有关详细信息,请参阅 “配置单一登录”。

通过指定凭据进行身份验证

In All connections, select a resource from the list.

Select Manage as to specify the credentials that you'll use to authenticate to the managed node.

如果 Windows Admin Center 在 Windows Server 上以服务模式运行,但未配置 Kerberos 委派,则必须重新输入 Windows 凭据。

您可以将凭据应用于所有连接,这些凭据将在特定的浏览器会话中被缓存。 If you reload your browser, you must reenter your Manage as credentials.

通过本地管理员密码解决方案进行身份验证

如果你的环境使用本地管理员密码解决方案 (LAPS),并且你在 Windows 10 电脑上安装了 Windows Admin Center,则可以使用 LAPS 凭据向托管节点进行身份验证。 If you use this scenario, you can provide feedback.

使用标记来整理连接

可以使用标记来标识和筛选连接列表中的相关资源。 如果你有许多连接,那么在连接列表中查看资源子集的功能就显得尤为有用。

Edit tags

可以在添加新连接时向连接添加标记。 Or you can add or edit them later for one or more connections on the All connections page.

添加或编辑标记:

在连接列表中,选择一个或多个连接。

Select Edit Tags.

On the Available tags pane, you can take any of these actions:

To add a new tag to your selected connections, select Add tags and enter a desired tag name.

若要标记具有现有标记名称的所选连接,请选中要应用的标记名称旁边的复选框。

若要从所有选定的连接中删除标记,请清除要删除的标记旁边的复选框。

如果标记应用于所选连接的子集,复选框会显示在中间状态。 你可以选中该复选框并将标记应用于所有选定的连接,或清除该复选框以从所有选定的连接中删除标记。

Select Save to save your changes.

按标记筛选连接

将标记添加到一个或多个连接后,可以查看连接列表中的标记,并按标记筛选连接列表。

若要按标记进行筛选,请选择搜索框旁边的筛选器图标。

You can select Or, And, or Not to modify the filter behavior of the selected tags.

使用 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 by using the -prune switch parameter

Import-Connection "https://wac.contoso.com" -fileName "WAC-connections.csv" -prune

用于导入连接的 CSV 文件格式

CSV 文件的格式从以下四个标题开始,然后每个连接另起一行。

name:连接的 FQDN。

type:连接类型。 对于 Windows Admin Center 附带的默认连接,请使用以下字符串之一:

Connection type

Connection string

Windows Server

msft.sme.connection-type.server

Failover cluster

msft.sme.connection-type.cluster

tags:以竖线分隔的标记。

groupId:共享连接的列。 使用此列中的值 global 进行共享连接。

Note

修改共享连接仅限于网关管理员。 任何用户都可以使用 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"

Note

CSV 文件区分大小写。

导入 RDCMan 连接

Use the following script to export saved connections in RDCMan to a file. 然后,可以使用标记将文件导入 Windows Admin Center 并维护 RDCMan 分组层次结构。

将以下代码复制并粘贴到 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 Windows Admin Center

}

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 want to export the new .csv file. If it's 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"

}

若要创建 CSV 文件,请运行以下命令:

RdgToWacCsv -RDGfilepath "path\to\myRDCManfile.rdg"

将生成的 CSV 文件导入 Windows Admin Center。 连接列表中的标记表示 RDCMan 分组层次结构。

查看在 Windows Admin Center 中使用的 PowerShell 脚本

连接到服务器、群集或电脑后,可以查看 PowerShell 脚本,这些脚本支持 Windows Admin Center 中提供的 UI作:

在工具中,选择应用程序栏上的 PowerShell 图标。

在下拉列表中,选择感兴趣的命令以转到相应的PowerShell脚本。

📌 相关推荐