PowerTip: Use PowerShell to Easily Compare Running Processes

Summary: Use Windows PowerShell to easily compare running processes on local or remote computers.

Hey, Scripting Guy! Question How can I compare running processes on my local computer or on two remote computers? 

Hey, Scripting Guy! Answer Use the Get-Process cmdlet to retrieve running process information (this can be used remotely). Store the results in a variable.
Do the same thing again against other computers or against the local computer after things have possibly changed.
Then use the Compare-Object cmdlet to compare the two objects. 

PS C:\> $a = Get-Process

PS C:\> notepad

PS C:\> $b = Get-Process

PS C:\> Compare-Object -ReferenceObject $a -DifferenceObject $b -Property name

name                                       SideIndicator

—-                                       ————-

notepad                                    =>

SearchProtocolHost                         <=


Comments (3)

  1. mredwilson says:

    @Janes here is an article where I talk about using Compare-Object with two folders. I provide more explanation there. blogs.technet.com/…/easily-compare-two-folders-by-using-powershell.aspx

  2. Janes says:

    I did not understand the steps, please elaborate the steps.

  3. Dams says:


    I have cretaed a tool with which you can export services, hotfix, software, drivers or process and compare them with other configuration.