Call now to talk to an automation expert — (512) 345-2211

Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).


How to call PowerShell from a Robo-FTP script

You can use the Robo-FTP EXEC command to call out to separate programs, such as PowerShell. You may wish to consult the PowerShell documentation for detailed information about how to run a PowerShell script by running powershell.exe directly. The following page is for Microsoft's PowerShell 5.1 command-line interface:

https://docs.microsoft.com/en-us/powershell/scripting/core-powershell/console/powershell.exe-command-line-help?view=powershell-5.1

Consider also the following example:

SET mycmd = 'powershell.exe  -WindowStyle Hidden -ExecutionPolicy Bypass -Command "& ""C:\path\to\script\thescript.ps1"""'
EXEC mycmd

We suggest you also review the documentation for the Robo-FTP EXEC command for any arguments that may be relevant to how you wish the script to be invoked.

Additionally, be aware that Robo-FTP can also be used from WITHIN a Powershell script. The following Robo-FTP Knowledge Base article provides some information for achieving that:

Article last updated: 2017-11-09

Tags: PowerShell, EXEC, Robo-FTP

Need help figuring out where to start?

Our sales staff is available to answer product questions and help you determine if Robo-FTP is a good match for your project.

Call Now: (512) 345-2211