【发布时间】:2017-10-01 10:03:39
【问题描述】:
我正在尝试使用以下参数通过 SSIS 运行以下 Poweshell 命令..
(get-content z:\2.html) | foreach-object {$_ -replace "><", ">`r`nE<"} | set-content z:\2.html
这在命令行中的 Powershell 中有效,但我无法让它在 SSIS 中工作。
我得到了错误
at "", The process exit code was "1" while the expected was "0".
在 SSIS 我有:
1. Created an "Execute process Task"
2. Pointed the Executable to system32\WIndowsPowershell .. etc
3. Added the argument as detailed above using a variable as the filename
有什么想法吗?
【问题讨论】:
-
为什么要在 SSIS 中运行 powershell 脚本? z:\2.html 的下一步是什么?
-
我在包含表格的 HTML 文件中添加换行符。然后我阅读以从这些表中提取数据。换行后,我可以在脚本中执行此操作!
标签: sql-server powershell ssis