Run the 32-bit Powershell script on the Sql Server Agent

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

When I run it in the Sql server agent task, it has the same 64x crash.

Is there any way around this? How are SSIS packages?

+3
source share
1 answer

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.

+4
source

All Articles