title: How to pass parameters to a Powershell script with UiPath
body: <p>I am trying to run a powershell script with uipath. I have found two approaches to run it;</p>
  
  <p>Read the script as a text and pass to Invoke Powershell activity
  Use Run powershell script activity from Script Activities package
  Now I need to pass arguments to the powershell script from uipath. Some have mentioned about formatting the string with parameters and invoking the script.</p>
  
  <p>But, rather than that, think we can directly pass parameters from UiPath.</p>
  
  <p>In <strong>Run Powershell script</strong>, it has <strong>Parameters</strong> as input</p>
  
  <p>In <strong>Invoke Powershell</strong>, it has <strong>Parameters</strong> under Input section and <strong>PowershellVariables</strong> under Misc</p>
  
  <p>I have been searching for a while. But still I am unable to figure out how to pass parameters using above activities.</p>
  
  <p>I am trying to send outlook mails using powershell. Still in the process of learning how to work with it. Plz help…</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Found solution for one approach. Added it as an answer.</p>