Display information about processes.
Syntax QUERY PROCESS * [/server:ServerName] QUERY PROCESS ProgramName [/server:ServerName] QUERY PROCESS ProcessID [/server:ServerName] QUERY PROCESS SessionName [/server:ServerName] QUERY PROCESS /id:nn [/server:ServerName] Key * List the processes for all sessions. ProcessID The numeric ID identifying the process that you want to query. UserName The name of the user whose processes you want to list. SessionName The name of the session whose processes you want to list. /id:nn The ID of the session whose processes you want to list. ProgramName The name of the program whose processes you want to query. The .exe extension is required. /server:ServerName The Remote Desktop Session Host server whose processes you want to list. default = server where you are currently logged on. /? Display help.
QPROCESS is a synonym for QUERY PROCESS.
QUERY PROCESS returns the following information:
If you do not specify a process with UserName, SessionName, or SessionID, then QUERY PROCESS will return only the processes that belong to the current user. When information for multiple processes is returned, a greater than > symbol is displayed before each process that belongs to the current session.
Administrators have full access to all query process functions.
Display information about the processes being used by all sessions:
C:\> query process *
Display information about the processes being used by session ID 2:
C:\> query process /ID:2
“Oh, what's going on, What's going on, Ya, what's going on, Ah, what's going on” - Marvin Gaye (What's Going On Lyrics)
TASKLIST - List running applications and services
Query Session - Display all sessions (TS/Remote Desktop)
Query TermServer - List all servers (TS/Remote Desktop)
Query User - Display user sessions (TS/Remote Desktop)
PsList - List detailed information about processes
TSSHUTDN - Remotely shut down or reboot a terminal server
CHANGE - Change Terminal Server Session properties
MSTSC - Terminal Server Connection (Remote Desktop Protocol)