query termserverquery termserver

适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows Server 2012 R2,Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

显示网络上所有远程桌面会话主机服务器的列表。Displays a list of all Remote Desktop Session Host servers on the network. 此命令将在网络上搜索所有附加的远程桌面会话主机服务器,并返回以下信息:This command searches the network for all attached Remote Desktop Session Host servers and returns the following information:

  • 服务器的名称Name of the server

  • 如果使用/address 选项,则为网络 (和节点地址) Network (and node address if the /address option is used)

备注

若要了解最新版本中的新增功能,请参阅 Windows Server 中远程桌面服务的新增功能To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

语法Syntax

query termserver [<servername>] [/domain:<domain>] [/address] [/continue]

参数Parameters

参数Parameter 说明Description
<servername> 指定标识远程桌面会话主机服务器的名称。Specifies the name that identifies the Remote Desktop Session Host server.
/domain<domain>/domain:<domain> 指定要查询终端服务器的域。Specifies the domain to query for terminal servers. 如果要查询当前正在工作的域,则无需指定域。You don't need to specify a domain if you are querying the domain in which you are currently working.
/address/address 显示每个服务器的网络和节点地址。Displays the network and node addresses for each server.
/continue/continue 阻止显示每个信息屏幕后暂停。Prevents pausing after each screen of information is displayed.
/?/? 在命令提示符下显示帮助。Displays help at the command prompt.

示例Examples

若要显示有关网络上所有远程桌面会话主机服务器的信息,请键入:To display information about all Remote Desktop Session Host servers on the network, type:

query termserver

若要显示有关名为 Server3的远程桌面会话主机服务器的信息,请键入:To display information about the Remote Desktop Session Host server named Server3, type:

query termserver Server3

若要显示有关域 CONTOSO中所有远程桌面会话主机服务器的信息,请键入:To display information about all Remote Desktop Session Host servers in domain CONTOSO, type:

query termserver /domain:CONTOSO

若要显示名为 Server3的远程桌面会话主机服务器的网络和节点地址,请键入:To display the network and node address for the Remote Desktop Session Host server named Server3, type:

query termserver Server3 /address

其他参考Additional References