PowerTip: Compare Processes with PowerShell

Doctor Scripto

Summary: Learn how to compare two processes with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the differences between two instances of the same process
           running on my system?

Hey, Scripting Guy! Answer Use the Compare-Object cmdlet and specify specific properties to examine, such as cpuidvm, and ws.
            Here is an example that uses two instances of Notepad:

$a = Get-Process -Id 6208

$b = Get-Process -Id 10744

Compare-Object -ReferenceObject $a -DifferenceObject $b -Property cpu, ws, vm, id

0 comments

Discussion is closed.

Feedback usabilla icon