Query Process / QPROCESS – Windows CMD Command
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:
- The user who owns the process
- The session that owns the process
- The ID of the session
- The name of the process – only the first 12 letters.
- The ID of the process
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.
Examples
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
a pleasurable world wide web