Query Process Command In Windows Server 2008

In this article I am going to explain about Query Process Command in Windows Server 2008 and also explain it's related syntax.
  • 1685

Introduction

In this we displays information about processes, sessions, and Remote Desktop Session Host and used to find out which programs a specific user is running, and also which users are running a specific program.

Syntax

query process [* | <ProcessID> | <UserName> | <SessionName> | /id:<nn> | <ProgramName>] [/server:<ServerName>]

 

 Parameter  Description
* It is used for Lists the processes for all sessions.
<ProcessID> It specifies the numeric ID identifying the process that we want to query.
<UserName> It specifies the name of the user who processes we want to list.
<SessionName> It specifies the name of the session whose processes you want to list.
/id:<nn> Specifies the ID of the session whose processes you want to list.
<ProgramName> Specifies the name of the program whose processes you want to query. The .exe extension is required.
/server:<ServerName> Specifies the RD Session Host server whose processes you want to list. If unspecified, the server where you are currently logged on is used.
/? Displays help at the command prompt.


Example
 

It is used to information about the processes being used by all sessions
 

query process *


It is used to display information about the processes being used by session ID 2
 

query process /ID:2


Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.