SSIS执行的Powershell失败,>>失败,进程退出代码为“ -196608”,而预期的退出代码为“ 0” <<

时间:2019-08-04 15:49:05

标签: powershell ssis

我有一个非常简单的powershell脚本,如下所示:

param ([string]$Filepath, [string]$FolderPathArchived)
Copy-Item -Path $Filepath -Destination $FolderPathArchived;

当我尝试在SSIS包(执行处理任务)中执行时,其参数(表达式)设置如下:

"-File C:\\Test_Copy.ps1 -Filepath " + @[User::FilePath] + " -FolderPathArchived " + @[User::FolderPathArchived]

该软件包失败,并出现以下错误:

[Execute Process Task] Error: In Executing 
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" 
"
-File C:\MyFolder\Test_Copy.ps1 
-Filepath C:\TEST\MyFile_1.xlsx 
-FolderPathArchived C:\CopyToFolder\
" 
at "", The process exit code was "-196608" while the expected was "0".

0 个答案:

没有答案