我有一个非常简单的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".