Windows Command-Line Utility
query.exe is safe. It is a legitimate Windows utility used to query user sessions, active sessions, and process status via Terminal Services. It is typically invoked from the command prompt or admin scripts.
query.exe is a Windows command-line helper that reports on user sessions, remote sessions, and running processes. It is a lightweight, non-graphical utility that administrators invoke to quickly surface who is logged on and what sessions exist on a host.
query.exe is a built-in Windows command-line tool that retrieves session and process information through Terminal Services APIs. It supports commands such as query user and query session, returning user names, IDs, and session state for auditing and remote management.
Quick Fact: query.exe has been part of Windows for decades and remains essential for quick, scriptable session auditing without a GUI.
Yes, query.exe is safe when it's the legitimate system utility located in C:\Windows\System32 and not replaced by malware.
The real query.exe is NOT a virus. Malware may masquerade with similar names, so verify location and signature.
C:\Windows\System32\query.exe (64-bit Windows) or C:\Windows\SysWOW64\query.exe (32-bit subsystem). Any other path is suspicious.Red Flags: If query.exe is found in non-system folders (Temp, AppData), runs without user action, lacks a valid signature, or consumes CPU constantly, scan with Windows Defender or other AV.
query.exe runs when an administrator or script queries session data, or when a remote desktop or monitoring tool requests session details.
Reasons it's running:
Disabling query.exe is not recommended. It is a standard Windows tool used for administration. You can restrict its use via permissions or remove it from startup scripts if needed.
If query.exe is consuming resources or producing unexpected results:
Quick Fixes:
1. Run query user /server:<host> to limit scope and avoid broad queries
2. Check for unauthorized CMD/Powershell sessions
3. Review scheduled tasks invoking query.exe and disable as needed
4. Update Windows and ensure a valid signature
5. Run antivirus and malware scans to rule out impersonation
No, query.exe is a legitimate Windows utility located in C:\Windows\System32. If found elsewhere or unsigned, scan for malware.
Query.exe is used to retrieve session and process information such as active sessions, user names, and IDs for administration.
Typically in C:\Windows\System32\query.exe. On 64-bit Windows, the 32-bit WOW64 version may reside elsewhere; verify signature.
Do not delete it; it is a system utility. You can disable usage via permissions or alter scripts that invoke it.
It usually isn't; if it runs at startup, it is likely invoked by a startup script or a scheduled task for auditing. Check Task Scheduler.
Limit the scope of queries, avoid frequent automatic runs, and run commands in a controlled manner to minimize CPU load.