title: How can I determine for which platform an executable is compiled?
body: <p>I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves.</p>
  
  <p>My target language is PowerShell but a C# example will do.  Failing either of those, if you know the logic required that would be great.</p>