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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top