Articles → AUTOMATION ANYWHERE → Run Powershell Command In Automation Anywhere

Run Powershell Command In Automation Anywhere






Powershell Script




  1. Open notepad or any text editor.
  2. Write following command in the editor
  3. Write-Host "Hello, World!"




  4. Save the file as ‘PS.ps1’.

Automation Anywhere Program




  1. Open the command prompt using ‘Open Program/File’ command.
  2. Picture showing opening the command prompt using Open Program/File command
    Click to Enlarge

  3. Add a keystroke and write Set-ExecutionPolicy command.
  4. Picture showing executing the Set-ExecutionPolicy command command using the Insert Keystrokes command
    Click to Enlarge

  5. Add a delay of 5 seconds. I am using this delay so that second command gets executed after first.
  6. Add a keystroke command to run PowerShell script
  7. Picture showing running the PowerShell command using the Insert keystrokes command
    Click to Enlarge




Picture showing the output of running PowerShell command in automation anywhere
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, April 4, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250