powershelluipathrpa

Powershell with UiPath


I am kicking off a PowerShell script with UiPath. I need to pass an argument in, from UiPath. Firstly is this possible and secondly does anyone have an example of this? Not sure what the syntax is for this in the PowerShell script


Solution

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

    Code sample(PSSampleParameters.txt):

    Param(
      [string]$computerName
    )
    
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") 
    [System.Windows.Forms.MessageBox]::Show($computerName) 
    

    Read Text File activity

    Invoke Power Shell Activity

    Add Parameter