简体   繁体   English

使用OnTap cmdlet从SSIS运行Powershell脚本会引发错误,但是从PS Cmd Line运行时却不会出错?

[英]Running Powershell script from SSIS with OnTap cmdlets throws error, but not when run from PS Cmd Line?

We are trying to run a Poweshell Script that uses the OnTap PS Modules, from SSIS, when we do, an error is issued: 我们试图从SSIS运行使用OnTap PS模块的Poweshell脚本,当这样做时,会发出错误消息:

Error: The term 'Connect-NaController' is not recognized as the name of a cmdlet, function, script file, or operable program. 错误:术语“ Connect-NaController”未被识别为cmdlet,函数,脚本文件或可运行程序的名称。 Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 检查名称的拼写,或者是否包含路径,请验证路径是否正确,然后重试。

But when we run the same script from the Powershell Command Line, then the script runs just fine. 但是,当我们从Powershell命令行运行相同的脚本时,该脚本就可以正常运行。 So I think the scripts are fine. 所以我认为脚本很好。

So I'm wondering if the security context is different or we have to do something more explicitly in our call from SSIS? 因此,我想知道安全性上下文是否不同,还是我们必须在SSIS的呼叫中更明确地执行某些操作?

When we call the script from SSIS we use: -ExecutionPolicy ByPass 当我们从SSIS调用脚本时,我们使用:-ExecutionPolicy ByPass

Thanks! 谢谢!

在SSIS中,我必须设置脚本的完整路径,而不是./scriptfile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM