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
Maybe another route [Environment]::Is64BitProcess
LikeLike
I believe if I remember right that only lets you know if your current Shell is running in 64 bit mode. Here is the writeup for that property on Microsoft’s site: https://docs.microsoft.com/en-us/dotnet/api/system.environment.is64bitprocess?view=netframework-4.8
LikeLike