Powershell with UiPath

你离开我真会死。 提交于 2019-12-08 00:47:25

Is it possible to pass arguments from UiPath to the terminal.

  • Your PowerShell script needs to be saved in a txt file.(PSSampleParameters.txt)

Code sample(PSSampleParameters.txt):

Param(
  [string]$computerName
)

[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") 
[System.Windows.Forms.MessageBox]::Show($computerName) 
  • Add a "Read Text file" activity and on filename add your PowerShell script.

  • Add "Invoke Power Shell" activity and be sure that you set "ContinueOnError" to True and check "IsScript"

  • With "Invoke power shell" activity selected go to on right panel and click on "..." button from Parameters. In the screen that will open you can add your parameters.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!