大网数据广告活动
远程桌面与会话

Query User command can't query from remote server

· 52CE 我爱测

Fixes an issue where the QUERY USER command doesn't query information from a remote server.

This article provides help to fix an issue where the query user command doesn't query information from a remote server.

Original KB number:   235567

Symptoms

When you use the query user command to obtain information from a remote server, it reports that the user does not exist.

For example:
query user username /server:remoteserver

The following error may also be displayed:

No user exists for username

Cause

This problem occurs when you use the query user command and specify a user name. The Query command assumes this to be local and only looks at the local server for this user.

Using query user /SERVER:REMOTESERVER does report this information but lists all users currently logged on to the remote server.

Resolution

To resolve this problem, obtain the latest service pack for Windows NT Server 4.0, Terminal Server Edition.

Workaround

To work around this problem, use one of the following methods:

  • Query the remote server and do not type username. This command lists all users on that server.
    query user / server:remoteserver

  • To obtain a single user listing, you could send the output of the above command through find:
    query user / server:remoteserver | find "username"

  • Create a batch file to query for a single user.
    Batch File Name: Q.bat
    Type the following text in the batch file, and then save the file: query user / server :%1 | find "%2"
    Type the following at a command prompt:

    q remoteserver username

    [!NOTE] REMOTESERVER and USERNAME are the respective server and user that you are are trying to query.

Status

Microsoft has confirmed that this is a problem in Microsoft Windows NT Server versions 4.0, 4.0 SP, Terminal Server Edition.

This problem was first corrected in Windows NT Server 4.0, Terminal Server Edition, Service Pack 5.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。