Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: Compare Processes with PowerShell

$
0
0

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


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>