Quick Script – 64bit vs 32bit

I needed a quick way to find out if a process was running in 32bit mode.

Here is the script to do just that:

get-process |Where-Object{$_.modules.modulename -contains "wow64.dll"}

if you want to validate that the numbers match here are some additional querys

$process = Get-Process
$32Bit = ($process | Where-object{ if((@($_.modules.modulename) -contains "wow64.dll")){$_}})
$64Bit = ($process | where-object { if((@($_.modules.modulename) -notContains "wow64.dll")){$_}})

($32bit.count + $64Bit.count) -eq $process.count


Hope this helps someone

Until then keep Scripting

Advertisement