Additional details for a process can be displayed by piping the results of Get-Process to the
Format-List cmdlet along with the names of properties of interest. Use the wildcard * character to
display all properties. Using these additional properties administrators can determine and confirm such
important details as file version, image path, process start time, and loaded modules to name a few.
Chapter 2: Using Exchange Management Shell
55
Administrators can end processes using the Stop-Process cmdlet along with the Process Identifier. In
the following example the Get-Process cmdlet is used to get all processes for the application Notepad ,
and then the Stop-Process cmdlet is used to stop one of them:
[PS] C:\ > Get-Process notepad
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
62 2 868 3608 27 0.91 1020 notepad
62 2 848 3600 27 0.29 2556 notepad
[PS] C:\ > Stop-Process 1020
[PS] C:\ > Get-Process notepad
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
62 2 848 3600 27 0.29 2556 notepad
In this example the Process Identifier for both Notepad processes are returned by Get-Process . By
passing the Process Identifier 1020 to Stop-Process , the first instance of Notepad is ended and only
the second instance remains as confirmed by running Get-Process a second time.
Pages:
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107