【问题标题】:How to pass parameters to a Powershell script with UiPath如何使用 UiPath 将参数传递给 Powershell 脚本
【发布时间】:2018-11-15 08:51:24
【问题描述】:

我正在尝试使用 uipath 运行 powershell 脚本。我找到了两种运行它的方法;

将脚本作为文本读取并传递给 Invoke Powershell 活动 使用脚本活动包中的运行 powershell 脚本活动 现在我需要从 uipath 将参数传递给 powershell 脚本。有些人提到了使用参数格式化字符串和调用脚本。

但是,与其如此,不如认为我们可以直接从 UiPath 传递参数。

Run Powershell script中,它有Parameters作为输入

Invoke Powershell中,Input部分下有Parameters,Misc下有PowershellVariables

我已经找了一段时间了。但我仍然无法弄清楚如何使用上述活动传递参数。

我正在尝试使用 powershell 发送 Outlook 邮件。仍在学习如何使用它的过程中。请帮助...

编辑

找到一种方法的解决方案。添加它作为答案。

【问题讨论】:

标签: powershell parameters uipath


【解决方案1】:

this link 找到答案。在这两种方法中,它提供了一种使用 Invoke Power Shell 活动传递参数的解决方案。

  • 使用读取文本文件活动读取包含脚本的 .ps1/.txt 文件
  • 通过将文件内容作为 CommandTextParameter 集合中的参数传递来调用 Invoke Power Shell 活动。

但是,如果我能知道如何使用 Run power shell script 活动传递参数,那就太好了。

【讨论】:

    猜你喜欢
    • 2011-08-01
    • 2020-09-04
    • 1970-01-01
    • 2020-04-04
    • 2020-11-19
    • 2012-12-10
    • 1970-01-01
    • 2015-06-07
    相关资源
    最近更新 更多