On the command line, I run vsvars32 to run all visual studio command-line utilities (compiler, linker ...).
vsvars32
However, when I run the same with PowerShell, I cannot run utilities. What could be wrong?
The answer is here: Use PowerShell for Visual Studio Command Prompt
Running a batch file forces it to create its own process, which does not affect the powershell environment. For a workaround, see How to invoke a batch script package from Powershell?