3

I have a powershell script that runs a 32 bit com object so when I run it in Powershell 64x it fails but runs fine in 86x

When I run it in a Sql Server Agent job it has the same 64x failure.

Is there a way around this? Like SSIS packages?

Chris Hayes
  • 3,876
  • 7
  • 42
  • 72

1 Answers1

4

You can directly invoke the 32-bit version of PowerShell by calling it through the WOW64 path:

%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe

Using the -File command line argument you can pass the name of the script you would like to run.

Goyuix
  • 23,614
  • 14
  • 84
  • 128