[英]Is there any way to detect whether Windows server is running in headed or headless?
Is there any way to detect whether Windows 10 servers are running headed or headless mode using the command line?有什么方法可以使用命令行检测 Windows 10 服务器是在运行有头模式还是无头模式? What thing get change when the user disconnects himself from the window server?
当用户与 window 服务器断开连接时,会发生什么变化?
Query session
should provide whether the user disconnected from RDP or logged out from the console, but with other remote access solutions there is no universal indication. Query session
应提供用户是否从 RDP 断开或从控制台注销,但对于其他远程访问解决方案,没有通用指示。
Here's an example of query session on a computer with an active console session (not headless):这是在具有活动控制台 session(非无头)的计算机上查询 session 的示例:
C:\Users\foo>query session
SESSIONNAME USERNAME ID STATE TYPE DEVICE
services 0 Disc
>console foo 1 Active
31c5ce94259d4... 65536 Listen
rdp-tcp 65538 Listen
and here's a counterexample of using psexec
to get the output of query session
from a machine with disconnected RDP users, and no one on the console session:这是使用
psexec
从 RDP 用户断开连接的机器上获取query session
的 output 的反例,控制台上没有人 Z21D6F40CFB511982E4424E0E25ZA9:
C:\Users\administrator>psexec \\target -s query session
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
SESSIONNAME USERNAME ID STATE TYPE DEVICE
>services 0 Disc
console 1 Conn
jsmith 3 Disc
Administrator 12 Disc
rdp-tcp 65536 Listen
query exited on target with error code 1.
The definition of "headless" is also somewhat fraught, since VGA does not require backwards signaling, so if a server has no monitor connected, but is logged in and outputting video - is it "headless"? “无头”的定义也有点令人担忧,因为 VGA 不需要反向信号,所以如果服务器没有连接显示器,但登录并输出视频 - 它是“无头”吗? Does it know that it is headless?
它知道它是无头的吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.