Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Running Powershell script in Designer

MatthewK
5 - Atom

Hi everyone,

 

I have a workflow that clones and fills in Excel templates with requests for another department. Said department takes PDFs, so I mashed together a Powershell script that converts the Excel files in a specified folder into PDFs:

 

MatthewK_3-1620157223537.png

 

The script works as intended when run manually outside of Alteryx, but I need this to run automatically within my workflow.

 

This is my current configuration: 

MatthewK_1-1620156892327.png

MatthewK_4-1620157954684.png

 

 

Depending on how I fiddle with the configuration, I have gotten everything from a blank Powershell window to error code 1.

Any help would be greatly appreciated, I'm stumped!

 

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @MatthewK ,

 

The configuration seems ok.

 

Were you able to run the ps1 file generated by Alteryx as well? 

 

One important detail related to the run command tool is that it doesn't work properly when using a non admin version of Alteryx designer.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Installing-Admin-vs-Non-Admin/ta-p/...

 

Best,

Fernando Vizcaino

MatthewK
5 - Atom

Hi Fernando,

 

Tracking down the ps1 file Alteryx generated ended up being the clue I needed, thank you!

 

When I found & ran it, I realized Alteryx was not opening and running the generated script; specifying the working directory allowed the powershell script to run as expected. In this case, my workflow lives in a local Test folder.

 

Interestingly, I have a non-admin install, but am able to run command prompt and powershell scripts. Huh.

 

MatthewK_0-1620750095880.png

 

psubramanian
7 - Meteor

Can we run a PowerShell script that makes modifications to an Excel workbook on Alteryx Gallery/Server?

DavidSkaife
13 - Pulsar

Hi @psubramanian 

 

The short answer is yes via the Run Command Tool, but it depends on how your Server/Gallery is set up to run. More info here under Default Run Mode - https://help.alteryx.com/20221/server/gallery

and details on the tools that are blocked depending on the Run Mode - https://help.alteryx.com/20221/server/safe-and-semi-safe-run-modes-blocked-tools-events-and-data-con...

Labels