Did you know that on a 64-bit machine that not all processes are 64-bit? You can use this little trick to filter out only 32-bit processes:
Get-Process |
Where-Object {
($_ |
Select-Object -ExpandProperty Modules -ea 0 |
Select-Object -ExpandProperty ModuleName) -contains 'wow64.dll'
}
Where-Object {
($_ |
Select-Object -ExpandProperty Modules -ea 0 |
Select-Object -ExpandProperty ModuleName) -contains 'wow64.dll'
}